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 1153. Supercomputer

Python big numbers
Posted by TwoEightNine Goes #STAG [146110 SSAU] 24 Oct 2014 12:20
print(int((((8*int(input())+1)**.5)-1)/2))

why the fuck doesnt it work????
i got wa6, who can help me with tests?
Re: Python big numbers
Posted by Noob 24 Oct 2014 14:25
Do you know how floating-point numbers work?
Re: Python big numbers
Posted by Noob 24 Oct 2014 14:27
Hint: use binary search

Edited by author 24.10.2014 14:27
Re: Python big numbers
Posted by Evgeny Shulgin 2 May 2015 22:20
10^600 gives "OverflowError: int too large to convert to float" :)
Re: Python big numbers
Posted by mberdyshev 5 Jun 2016 19:43
You can use Python library "decimal"