ENG  RUSTimus 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 1132. Square Root

Can't even understand
Posted by Varun Sharma 20 Apr 2009 03:45
Hi,

For input 4 17, how come the output is 2 15 ? We have to do this right ?

sqrt(4 % 0) = undefined
sqrt(4 % 1) = 0
sqrt(4 % 2) = 0
sqrt(4 % 3) = 1
sqrt(4 % 4) = 0
sqrt(4 % 5) = 2
sqrt(4 % 6) = 2
sqrt(4 % 7) = 2
sqrt(4 % 8) = 2
sqrt(4 % 9) = 2
sqrt(4 % 10) = 2
..
..
sqrt(4 % 16) = 2

So where is 2 15 coming from ? Is there something wrong with the problem ?

Edited by author 20.04.2009 03:46

Edited by author 20.04.2009 03:46
No subject
Posted by Oleg Strekalovsky [Vologda SPU] 21 Apr 2009 00:45

Edited by author 21.04.2009 00:47

Edited by author 21.04.2009 00:47