标签:
------------------------------------------------------
AC代码:
1 import java.io.BufferedReader; 2 import java.io.IOException; 3 import java.io.InputStreamReader; 4 5 public class Main { 6 7 public static void main(String[] args) throws IOException { 8 9 BufferedReader reader=new BufferedReader(new InputStreamReader(System.in)); 10 11 double ans=0; 12 boolean first=true; 13 while(first || reader.ready()){ 14 first=false; 15 String ss[]=reader.readLine().split("\\s{1,}"); 16 ans+=Double.parseDouble(ss[1])*Double.parseDouble(ss[2]); 17 } 18 System.out.printf("%.1f",ans); 19 20 } 21 22 }
题目来源: http://acm.nyist.net/JudgeOnline/problem.php?pid=316
标签:
原文地址:http://www.cnblogs.com/cc11001100/p/5792264.html