Answer the question
In order to leave comments, you need to log in
Olympiad programming in python obscure runtime error?
Here is a link to the task I'm trying to solve
Link to the task
And here is the code that the NOC finds for me, but when checking, the system issues a runtime error, what could be the problem?
import math
r = open("input.txt")
w = open("output.txt","w")
A,B = map(int,r.readline().split())
w.write(str((A*B / math.gcd(A,B))))
r.close()
w.close()
Answer the question
In order to leave comments, you need to log in
The problem is something, since you do not realize that the full error output is needed.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question