AReduan's blog

By AReduan, history, 7 weeks ago, In English

Hi there I'm facing problem with python modules.Like when I try to find gcd or lcm using math module, it shows me runtime error. So what are those things that I can't perform in competitiveprogramming with python?

Rules or blog references please.

 
 
 
 
  • Vote: I like it
  • 0
  • Vote: I do not like it

»
7 weeks ago, # |
  Vote: I like it +8 Vote: I do not like it

math.lcm got added in Python 3.9. The current version of Python up on Codeforces is 3.8.10.

»
7 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

If you want to find gcd then you have to first (import math) then write (math.gcd(x,y)) where x and y are variables.