I've always liked using Python (PyPy) for solving problems in competitive programming. And most problems are very doable, even in Python. What I've found is that the most difficult problems to solve in Python are those requiring 64 bit integers.↵
↵
The reason why 64 bit integers are problematic is because CF runs Windows, and PyPy only supports 32 bit on Windows. So whenever a problem involves integers that cannot fit inside of a signed 32 bit int, PyPy switches to big integers (which runs insanely slow, sometimes a factor of 20 times slower).↵
↵
<spoiler summary="What I currently have to do to get around big integers">↵
### 1. Switching to floats↵
What I usually try is switching from using integers to floats. This works if all integers are $\leq 2^{52}$:↵
↵
[submission:53441394] (Fat TLE and almost MLE) vs [submission:53456822] (AC by a mile)↵
↵
### 2. Calculating `a * b % MOD`↵
Many problems on CF involve doing multiplication modulo $10^9 + 7$. This is super slow because of big integers. After a long time of trying around with different methods, I've found that [this](https://github.com/cheran-senthil/PyRival/blob/master/pyrival/misc/mod.py) is the best solution. Today I always use it whenever I do multiplication mod $10^9 + 7$. But sadly, while it is much faster than using big integers, it is still slow compared to doing `a * b % MOD` in 64 bit PyPy.↵
↵
### 3. When all else fails↵
Another trick is to use a deprecated feature that only exists in PyPy2:↵
↵
[submission:114602234] (Fat TLE) vs [submission:114611359] (AC by a mile)↵
↵
A big warning here. Not only is this feature deprecated, but from my own personal experience using it means opening a can of worms. I will only use this as an absolute last resort.↵
</spoiler>↵
↵
However with the latest PyPy version (version 7.3.4) PyPy has finally switched to 64 bit on Windows! So upgrading PyPy would mean no more problems with big integers. This would make PyPy far more usable and more beginner friendly. So if possible please update PyPy's version on CF to 7.3.4! [user:MikeMirzayanov,2021-04-29]↵
↵
Edit: Reading [Results of 2020 [list some changes and improvements]](https://mirror.codeforces.com/blog/entry/88691) blog I realized that I should probably be tagging [user:geranazavr555,2021-05-02], [user:kuviman,2021-05-02] and [user:cannor147,2021-05-02] too.↵
↵
The reason why 64 bit integers are problematic is because CF runs Windows, and PyPy only supports 32 bit on Windows. So whenever a problem involves integers that cannot fit inside of a signed 32 bit int, PyPy switches to big integers (which runs insanely slow, sometimes a factor of 20 times slower).↵
↵
<spoiler summary="What I currently have to do to get around big integers">↵
### 1. Switching to floats↵
What I usually try is switching from using integers to floats. This works if all integers are $\leq 2^{52}$:↵
↵
[submission:53441394] (Fat TLE and almost MLE) vs [submission:53456822] (AC by a mile)↵
↵
### 2. Calculating `a * b % MOD`↵
Many problems on CF involve doing multiplication modulo $10^9 + 7$. This is super slow because of big integers. After a long time of trying around with different methods, I've found that [this](https://github.com/cheran-senthil/PyRival/blob/master/pyrival/misc/mod.py) is the best solution. Today I always use it whenever I do multiplication mod $10^9 + 7$. But sadly, while it is much faster than using big integers, it is still slow compared to doing `a * b % MOD` in 64 bit PyPy.↵
↵
### 3. When all else fails↵
Another trick is to use a deprecated feature that only exists in PyPy2:↵
↵
[submission:114602234] (Fat TLE) vs [submission:114611359] (AC by a mile)↵
↵
A big warning here. Not only is this feature deprecated, but from my own personal experience using it means opening a can of worms. I will only use this as an absolute last resort.↵
</spoiler>↵
↵
However with the latest PyPy version (version 7.3.4) PyPy has finally switched to 64 bit on Windows! So upgrading PyPy would mean no more problems with big integers. This would make PyPy far more usable and more beginner friendly. So if possible please update PyPy's version on CF to 7.3.4! [user:MikeMirzayanov,2021-04-29]↵
↵
Edit: Reading [Results of 2020 [list some changes and improvements]](https://mirror.codeforces.com/blog/entry/88691) blog I realized that I should probably be tagging [user:geranazavr555,2021-05-02], [user:kuviman,2021-05-02] and [user:cannor147,2021-05-02] too.↵