|
|
Must I use long arithmetic to solve this problem? If no, than what standart type i must to use? Here it is some numbers in exponentional notation. Maybe they will help anybody: 1e1 1e0 1.0e1 1.12312e-100 Yes, It may be WA because the dot('.') isn't there #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; } Sorry for my bad English :( Edited by author 28.09.2004 01:50 What is exponential notation in this problem? I think that it is A.BeK, where 1<=A<=9. Am I right? What parts can be absent? 1)For example, are the numbers 1.0 1.e10 .1 5 9e1 possible in this problem? 2) Which output is correct? 7.000000000000000000 OR 7.000000000000000000e0 3) Which output is correct? 1.5e3 OR 1.500000000000000000e3 > I think trunc...however the problem is locked...I can't check it! > MAYBE WRONG FORMAR. MAYBE {$N+}. ROUND!!!! 1.9..99 -> 2.0...00 1.9..95 -> 2.0...00 1.9..91 -> 1.9...90 ( ^^^ last digit is 20-th you don't need to output it) Edited by author 09.04.2004 01:09 Are you sure that all of "next N lines contain the elements in exponential notation with 19 significant digits in mantissa" ? Especially "one number on each string" ("по одному в строке"), as it is written in russian version of problem. (Test #6). "exponential notation" means more than I expected. Is it locked now?? Who can tell me! Is it locked now?? Who can tell me! Why Problem Temporary Locked? What is it? |
|
|