import java.io.*;
public class Solution {
public static void main(String[] args) throws Exception {
BufferedReader bf = new BufferedReader(new InputStreamReader(System.in));
int n = 0;
double sum = 0;
while(true){
int num = Integer.parseInt(bf.readLine());
if(num==-1) {
break;
}
sum+=num;
n++;
}
System.out.printf("%.1f",sum/n);
}
}
算数平均值一直通不过最后一个验证......
This website uses cookies to provide you with personalized service. By using this website, you agree to our use of cookies. If you require more details, please read our Terms and Policy.
GO TO FULL VERSION