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

Common Board

To admins: extending Python guide
Posted by Yury_Semenov 4 Dec 2024 17:58
Recent Python versions contain a dangerous pitfall for people who use Python for solving bigint problems: https://docs.python.org/3/library/stdtypes.html#int-max-str-digits

In short, converting large integers to string raises an exception unless you explicitly raise the limit with sys.set_int_max_str_digits(1000000). Since Python is quite popular for bigint problems and this pitfall is very easy to miss, especially when you have an older version locally, I suggest mentioning it in the Python guide.