ENG
RUS
Timus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board
Discussion of Problem
1248
. Sequence Sum
Help, please. Why my program Wrong?
Posted by
Aleksey Meshnikovsky
9 Oct 2004 16:12
#include <stdio.h>
#include <string.h>
int main()
{
long double a, b;
int n, i, j;
b = 0.0;
scanf("%ld", &n);
for (i = 0; i < n; ++i) {
scanf("%Lf", &a);
b += a;
}
printf("%.18Le", b);
return 0;
}
© 2000–2024
Timus Online Judge Team
. All rights reserved.