I am getting wrong answer after submitting but when i run the same code for same test case in my laptop in devc++ it gives correct answer, please help me... this is the question and my solution
I am getting wrong answer after submitting but when i run the same code for same test case in my laptop in devc++ it gives correct answer, please help me... this is the question and my solution
| № | Пользователь | Рейтинг |
|---|---|---|
| 1 | Benq | 3676 |
| 2 | Kevin114514 | 3659 |
| 3 | jiangly | 3640 |
| 4 | turmax | 3450 |
| 5 | tourist | 3382 |
| 6 | strapple | 3360 |
| 7 | Um_nik | 3354 |
| 8 | squareOf105 | 3348 |
| 9 | maroonrk | 3312 |
| 10 | idontwannadothis…e | 3191 |
| Страны | Города | Организации | Всё → |
| № | Пользователь | Вклад |
|---|---|---|
| 1 | Qingyu | 158 |
| 2 | nik_exists | 151 |
| 3 | maspy | 149 |
| 4 | AmShZ | 144 |
| 5 | Um_nik | 143 |
| 6 | Errichto | 139 |
| 7 | adamant | 136 |
| 8 | BledDest | 133 |
| 9 | maroonrk | 132 |
| 10 | Proof_by_QED | 131 |
| Название |
|---|



Don't use double when not required
How is it creating a problem?? Please explain.
Precision issues. You cannot store a float value with 100% accuracy.
I did it but the error still persists.
You're still using log function. It returns double value.
That's not what he meant. You're using floating-point functions like log, pow. Just do it in a for loop using integer arithmetic or something, and you'll prevent random WA's like this which come from precision problems.
Ok
Thanks it worked...