|  | 
|  | 
| вернуться в форум | AC 0.015s, 120kb #include <iostream>#include <cstdio>
 
 using namespace std;
 
 int main()
 {
 int N;
 double sum;
 scanf("%d", &N);
 for(int i = 0; i < N; i++)
 {
 int p;
 scanf("%d", &p);
 sum += (double)p;
 }
 sum /= double(N);
 printf("%.6lf", sum);
 return 0;
 }
Re: AC 0.015s, 120kb Man you're awesome! I'm sure your solution is the best among 3000 others!Re: AC 0.015s, 120kb Not true.You should initialize sum = 0 or it will be a trash number.
 Edited by author 09.09.2012 18:47
 
 Edited by author 09.09.2012 18:47
Re: AC 0.015s, 120kb Congratulation!!! >_< | 
 | 
|