|
|
back to boardAC 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 Posted by Al.Cash 18 Sep 2011 23:56 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 Posted by phonism 29 Sep 2012 16:16 Congratulation!!! >_< |
|
|