这题真要做, 只能用集合实现
BufferedReader bfr = new BufferedReader(new InputStreamReader(System.in));
String str = null;
List list = new ArrayList();
int sum = 0;
int temp = 0;
while((str=bfr.readLine())!=null){
if(str.equals("over")){
if(list.size()==1){
System.out.println("请重新运行");
break;
}else{
for (int i = 0; i < list.size(); i++) {
temp = Integer.parseInt((String)list.get(i));
sum = sum+temp;
}
}
System.out.println(sum);
break;
}else{
list.add(str);
}
}