|
|
back to boardPlease write answer for this test This is like test N6 -1.00 34.86 200 My program writes: 303.62 0 17 And gets WA. Please help. Edited by author 13.07.2009 22:59 Re: Please write answer for this test It's right answer. I had WA 7, and got AC after changing float to double. Maybe you have the same problem? Re: Please write answer for this test Thank you. My code: __int64 a, b; double da, db; scanf("%lf%lf", &da, &db); a = (__int64)(100*da); b = (__int64)(100*db); I think, it`s all right with precision. What do you think? Re: Please write answer for this test Try to add after scanf: da += 0.000000001; db += 0.000000001; It helped me when i solved N1316 and also translated double to int. Re: Please write answer for this test Thank you very much one more! Accepted. Now I know this feauture and will advise it to everyone. |
|
|