This is my first time submitting an answer with python. I tried PyPy 3-64
but got runtime error, I thought it was my fault to submit with PyPy as the language which I don't know anything about it. Then I tried to submit again with Python 3
in no vain.
These are my submissions:
- https://codeforces.me/contest/1690/submission/160147330
- https://codeforces.me/contest/1690/submission/160147403
Can anyone help?!
In general, to debug something like this, run code in "CUSTOM INVOCATION". I run your submission and it show message below:
The reason is function 'math.lcm' is new in Python 3.9 but the Python env on codeforces is 3.8.10.
Thank you, I will try to find a workaround with
gcd
.gcd(a,b) * lcm(a,b) = a*b
I think the problem is that
math.lcm
that I used in my submission is new in Python 3.9 and not available in Python 3.8.Source: https://docs.python.org/3/library/math.html#math.lcm