lcm in python3

Revision ru1, by cohadar, 2023-09-08 08:02:02

Problem D in recent div3 contest uses lcm function.

This function exists in math library in python 3.9 but NOT in codeforces python 3.8

It is of course easy to define it with gcd function: lcm(a, b) == a * b // gcd(a, b)

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
ru1 Russian cohadar 2023-09-08 08:02:02 279 Первая редакция (опубликовано)