Блог пользователя MuhammadSawalhy

Автор MuhammadSawalhy, история, 2 года назад, По-английски

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:

  1. https://mirror.codeforces.com/contest/1690/submission/160147330
  2. https://mirror.codeforces.com/contest/1690/submission/160147403

Can anyone help?!

  • Проголосовать: нравится
  • 0
  • Проголосовать: не нравится

»
2 года назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

In general, to debug something like this, run code in "CUSTOM INVOCATION". I run your submission and it show message below:

Message

The reason is function 'math.lcm' is new in Python 3.9 but the Python env on codeforces is 3.8.10.

»
2 года назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

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