s_id string | p_id string | u_id string | date string | language string | original_language string | filename_ext string | status string | cpu_time string | memory string | code_size string | code string | error string | stdout string |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
s787322030 | p00004 | u193025715 | 1394765116 | Python | Python | py | Runtime Error | 0 | 0 | 211 | while 1:
try:
a, b, c, d, e, f = map(int, raw_input().split())
g = b / e
x = (c - g * f) / (float(a) - g)
y = (c - a * x) / float(b)
print str(x) + " " + str(y)
except EOFError:
break | File "/tmp/tmpdvyq_k2p/tmpbohxhfb3.py", line 7
print str(x) + " " + str(y)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s018402494 | p00004 | u193025715 | 1394765127 | Python | Python | py | Runtime Error | 0 | 0 | 211 | while 1:
try:
a, b, c, d, e, f = map(int, raw_input().split())
g = b / e
x = (c - g * f) / (float(a) - g)
y = (c - a * x) / float(b)
print str(x) + " " + str(y)
except EOFError:
break | File "/tmp/tmpo8ygwqlw/tmp467pl6yb.py", line 7
print str(x) + " " + str(y)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s532186463 | p00004 | u193025715 | 1394765843 | Python | Python | py | Runtime Error | 0 | 0 | 196 | while 1:
try:
a, b, c, d, e, f = map(float, raw_input().split())
g = b / e
x = (c - g * f) / a - g)
y = (c - a * x) / b
print str(x) + " " + str(y) + "\n"
except:
break | File "/tmp/tmp5wysly9k/tmphmyvoqqn.py", line 5
x = (c - g * f) / a - g)
^
SyntaxError: unmatched ')'
| |
s696119348 | p00004 | u193025715 | 1394765906 | Python | Python | py | Runtime Error | 0 | 0 | 223 | while 1:
try:
a, b, c, d, e, f = map(int, raw_input().split())
g = float(b) / float(e)
float(x) = (c - g * f) / (a - g)
float(y) = (c - a * x) / b
print str(x) + " " + str(y) + "\n"
except:
break | File "/tmp/tmpy4kgxe0s/tmpjajr71h2.py", line 5
float(x) = (c - g * f) / (a - g)
^^^^^^^^
SyntaxError: cannot assign to function call here. Maybe you meant '==' instead of '='?
| |
s456604543 | p00004 | u193025715 | 1394788733 | Python | Python | py | Runtime Error | 0 | 0 | 235 | while 1:
try:
a, b, c, d, e, f = map(float, raw_input().split())
x = (c * e - b * f) * / (a * e - b * d)
y = (f * a - c * d) * / (a * e - d * b)
print str('%.3f' % x) + " " + str('%.3f' % y) + "\n"
except:
break | File "/tmp/tmphlx7t6jw/tmpenpoqz81.py", line 4
x = (c * e - b * f) * / (a * e - b * d)
^
SyntaxError: invalid syntax
| |
s106350730 | p00004 | u703161091 | 1398341381 | Python | Python | py | Runtime Error | 0 | 0 | 345 | while True:
line = raw_input()
if not line: break;
lines = [int(x) for x in line.split(" ")]
if lines.length == 6:
x = 0
y = 0
(A1, B1, E1, A2, B2, E2) = lines
if A1*B2==B1*A2 or A1*B2-A2*B1:
break;
x=1000*(E1*B2-B1*E2)/(A1*B2-B1*A2)
y=1000*(E2*A1-E1*A2)/(A1*B2-A2*B1)
print "%.3f %.3f" % (round(x)/1000, round(y)/1000) | File "/tmp/tmp8glo7p4e/tmp80cijg1a.py", line 15
print "%.3f %.3f" % (round(x)/1000, round(y)/1000)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s125155628 | p00004 | u146816547 | 1398776953 | Python | Python | py | Runtime Error | 0 | 0 | 134 | while True:
a,b,e,d,e,f = map(float,raw_input().split())
x = (e*c-b*f) / (e*a-b*d)
y = (c*d-a*f) / (b*d-e*a)
print '%d %d' % (x,y) | File "/tmp/tmpctrq9i1e/tmpqzzsstek.py", line 5
print '%d %d' % (x,y)
^^^^^^^^^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s586332088 | p00004 | u146816547 | 1398777046 | Python | Python | py | Runtime Error | 0 | 0 | 138 | while True:
a,b,c,d,e,f = map(float,raw_input().split())
x = (e*c-b*f) / (e*a-b*d)
y = (c*d-a*f) / (b*d-e*a)
print '%.3f %.3f' % (x,y) | File "/tmp/tmpztv9pqsy/tmpvfhe9bpu.py", line 5
print '%.3f %.3f' % (x,y)
^^^^^^^^^^^^^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s932907921 | p00004 | u146816547 | 1398777142 | Python | Python | py | Runtime Error | 0 | 0 | 138 | while True:
a,b,c,d,e,f = map(float,raw_input().split())
x = (e*c-b*f) / (e*a-b*d)
y = (c*d-a*f) / (b*d-e*a)
print '%.3f %.3f' % (x,y) | File "/tmp/tmprnev4v4h/tmp6cb4h3s1.py", line 5
print '%.3f %.3f' % (x,y)
^^^^^^^^^^^^^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s836918580 | p00004 | u146816547 | 1398777245 | Python | Python | py | Runtime Error | 0 | 0 | 223 | while True:
try:
a,b,c,d,e,f = map(float,raw_input().split())
x = (e*c-b*f) / (e*a-b*d)
y = (c*d-a*f) / (b*d-e*a)
if x == -0.0:
x = 0
if y == -0.0
y = 0
print '%.3f %.3f' % (x,y)
except EOFError:
break | File "/tmp/tmp17300c20/tmpxv9y2g1o.py", line 8
if y == -0.0
^
SyntaxError: expected ':'
| |
s124632260 | p00004 | u525640557 | 1402386224 | Python | Python | py | Runtime Error | 0 | 0 | 62 | x=(e*d-b*f)/(a*d-b*c)
y=(-e*c+a*f)/(a*d-b*c)
print x
print y | File "/tmp/tmp2iadv9vm/tmphymcp61k.py", line 4
print x
^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s783933809 | p00005 | u179046735 | 1555895429 | Python | Python3 | py | Runtime Error | 0 | 0 | 352 | #include <stdio.h>
using namespace std;
int gcd(unsigned long num1,unsigned long num2) {
if (num2 == 0) {
return num1;
}return gcd(num2, num1 % num2);
}
int lcm(unsigned long n1, unsigned long n2) {
return n1 * n2 / gcd(n1, n2);
}
int main() {
unsigned long a, b;
while (~scanf("%d %d",&a,&b)) {
printf("%d %d\n", gcd(a, b),lcm(a,b));
}
}
| File "/tmp/tmpl2615gql/tmpr8rhlmsn.py", line 2
using namespace std;
^^^^^^^^^
SyntaxError: invalid syntax
| |
s103766530 | p00005 | u936370024 | 1556875655 | Python | Python3 | py | Runtime Error | 0 | 0 | 348 |
while True:
try:
m,n = map(int,input().split())
if m<n:
a = n
b = m
else:
a = m
b = n
c = a % b
while c != 0:
temp = c
if b % c == 0:
break
c = b % c
b = temp
d = m * n / c
print(str(c) + " " + str(int(d)))
except EOFError:
break
| ||
s418959623 | p00005 | u150337404 | 1408257801 | Python | Python | py | Runtime Error | 0 | 0 | 501 | import sys
# 入力が終わるまで読み込む
while 1:
line = sys.stdin.readline()
if (not line):
break
# 2つの変数に読み込み
x, y = map(int, line.split())
# ユークリッドの互除法
if (x > y):
gcd = x
t = y
else :
gcd = y
t = x
while (t > 0) :
tmp = gcd % t
gcd = t
t = tmp
# 最小公倍数を求める A * B = GCD * LCM
lcm = x * y / gcd
print str(gcd) + " " + str(lcm) | File "/tmp/tmplcvz9qvw/tmpk8q6scff.py", line 23
print str(gcd) + " " + str(lcm)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s988665265 | p00005 | u150337404 | 1408257872 | Python | Python | py | Runtime Error | 0 | 0 | 501 | import sys
# 入力が終わるまで読み込む
while 1:
line = sys.stdin.readline()
if (not line):
break
# 2つの変数に読み込み
x, y = map(int, line.split())
# ユークリッドの互除法
if (x > y):
gcd = x
t = y
else :
gcd = y
t = x
while (t > 0) :
tmp = gcd % t
gcd = t
t = tmp
# 最小公倍数を求める A * B = GCD * LCM
lcm = x * y / gcd
print str(gcd) + " " + str(lcm) | File "/tmp/tmpl53qu_5c/tmpdl4espc1.py", line 23
print str(gcd) + " " + str(lcm)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s919635147 | p00005 | u334500775 | 1421471312 | Python | Python3 | py | Runtime Error | 0 | 0 | 814 | import sys
#最大公約数
def gcd(x, y):
s = x / y
r = x % y
if r == 0:
return y
else:
return gcd(y, r)
#最小公倍数
def lcm(x, y):
return x*y/gcd(x, y)
def main():
#print ("a")
tmp = sys.stdin.readline().split(" ")
#print ("b")
while 1:
a = int(tmp[0])
b = int(tmp[1])
#print ("a="+str(a))
#print ("b="+str(b))
#b = sys.stdin.readline()
#print ("d")
if a > b:
c = a
d = b
else:
c = b
d = a
print (str(gcd(c, d)) + " " + str(int(lcm(c,d))))
tmp = sys.stdin.readline()
if len(tmp) == 1:
break
else:
tmp = tmp.split(" ")
#print ("exit")
if __name__ == "__main__":
main() | Traceback (most recent call last):
File "/tmp/tmpx021wz1l/tmpy3ysjt3p.py", line 45, in <module>
main()
File "/tmp/tmpx021wz1l/tmpy3ysjt3p.py", line 21, in main
a = int(tmp[0])
^^^^^^^^^^^
ValueError: invalid literal for int() with base 10: ''
| |
s054585069 | p00005 | u334500775 | 1421471368 | Python | Python | py | Runtime Error | 0 | 0 | 814 | import sys
#最大公約数
def gcd(x, y):
s = x / y
r = x % y
if r == 0:
return y
else:
return gcd(y, r)
#最小公倍数
def lcm(x, y):
return x*y/gcd(x, y)
def main():
#print ("a")
tmp = sys.stdin.readline().split(" ")
#print ("b")
while 1:
a = int(tmp[0])
b = int(tmp[1])
#print ("a="+str(a))
#print ("b="+str(b))
#b = sys.stdin.readline()
#print ("d")
if a > b:
c = a
d = b
else:
c = b
d = a
print (str(gcd(c, d)) + " " + str(int(lcm(c,d))))
tmp = sys.stdin.readline()
if len(tmp) == 1:
break
else:
tmp = tmp.split(" ")
#print ("exit")
if __name__ == "__main__":
main() | Traceback (most recent call last):
File "/tmp/tmpsvnplvua/tmptwslay89.py", line 45, in <module>
main()
File "/tmp/tmpsvnplvua/tmptwslay89.py", line 21, in main
a = int(tmp[0])
^^^^^^^^^^^
ValueError: invalid literal for int() with base 10: ''
| |
s255505419 | p00005 | u334500775 | 1421471786 | Python | Python3 | py | Runtime Error | 0 | 0 | 817 | import sys
#最大公約数
def gcd(x, y):
s = x / y
r = x % y
if r == 0:
return y
else:
return gcd(y, r)
#最小公倍数
def lcm(x, y):
return x*y/gcd(x, y)
def main():
#print ("a")
tmp = sys.stdin.readline().split(" ")
#print ("b")
while 1:
a = long(tmp[0])
b = long(tmp[1])
#print ("a="+str(a))
#print ("b="+str(b))
#b = sys.stdin.readline()
#print ("d")
if a > b:
c = a
d = b
else:
c = b
d = a
print (str(gcd(c, d)) + " " + str(long(lcm(c,d))))
tmp = sys.stdin.readline()
if len(tmp) == 1:
break
else:
tmp = tmp.split(" ")
#print ("exit")
if __name__ == "__main__":
main() | Traceback (most recent call last):
File "/tmp/tmp009jih4v/tmp3vfyaxzg.py", line 45, in <module>
main()
File "/tmp/tmp009jih4v/tmp3vfyaxzg.py", line 21, in main
a = long(tmp[0])
^^^^
NameError: name 'long' is not defined
| |
s077958511 | p00005 | u334500775 | 1421472011 | Python | Python3 | py | Runtime Error | 0 | 0 | 172 | import sys
def main():
tmp = sys.stdin.readline().split(" ")
a = long(tmp[0])
b = long(tmp[1])
print ("Hello World")
if __name__ == "__main__":
main() | Traceback (most recent call last):
File "/tmp/tmplb_6yd2g/tmpsag8056f.py", line 9, in <module>
main()
File "/tmp/tmplb_6yd2g/tmpsag8056f.py", line 4, in main
a = long(tmp[0])
^^^^
NameError: name 'long' is not defined
| |
s275245972 | p00005 | u334500775 | 1421472634 | Python | Python3 | py | Runtime Error | 0 | 0 | 318 | import sys
def main():
tmp = sys.stdin.readline().split(" ")
while 1:
if a > b:
c = a
d = b
else:
c = b
d = a
tmp = sys.stdin.readline()
if len(tmp) == 1:
break
if __name__ == "__main__":
main() | Traceback (most recent call last):
File "/tmp/tmp5tf5koq6/tmp5mbsvvh1.py", line 19, in <module>
main()
File "/tmp/tmp5tf5koq6/tmp5mbsvvh1.py", line 5, in main
if a > b:
^
NameError: name 'a' is not defined
| |
s176528614 | p00005 | u334500775 | 1421472831 | Python | Python3 | py | Runtime Error | 0 | 0 | 311 | import sys
def main():
tmp = sys.stdin.readline()
while tmp:
tmp = sys.stdin.readline().split("")
if a > b:
c = a
d = b
else:
c = b
d = a
tmp = sys.stdin.readline()
if __name__ == "__main__":
main() | ||
s719090957 | p00005 | u334500775 | 1421472889 | Python | Python3 | py | Runtime Error | 0 | 0 | 325 | import sys
def main():
tmp = sys.stdin.readline()
while tmp:
tmp = sys.stdin.readline().split("")
if a > b:
c = a
d = b
else:
c = b
d = a
tmp = sys.stdin.readline()
break
if __name__ == "__main__":
main() | ||
s931041114 | p00005 | u334500775 | 1421472921 | Python | Python3 | py | Runtime Error | 0 | 0 | 353 | import sys
def main():
tmp = sys.stdin.readline()
while tmp:
tmp = sys.stdin.readline().split("")
a = 1
b = 2
if a > b:
c = a
d = b
else:
c = b
d = a
tmp = sys.stdin.readline()
break
if __name__ == "__main__":
main() | ||
s804546081 | p00005 | u396642573 | 1429364598 | Python | Python | py | Runtime Error | 0 | 0 | 285 | def gcd(a,b):
r = a % b
while r > 0:
a = b
b = r
r = a % b
return b
def lcm(a,b):
return a*b / gcd(a,b)
while True:
try:
a,b = map(int, raw_input().split())
print gcd(a,b) + " " + lcm(a,b)
except EOFError:
break | File "/tmp/tmpjhmp1tlh/tmphnrw2n7g.py", line 15
print gcd(a,b) + " " + lcm(a,b)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s217861763 | p00005 | u024599888 | 1433402596 | Python | Python3 | py | Runtime Error | 0 | 0 | 221 | #!/usr/bin/env python3
while(True):
try:
a, b=map(int, input().split())
gcd=0
for i in range(a):
if(a%i==0 and b%i==0):
gcd=i
lcm=a*b/gcd
print("{0} {1}".format(gcd, lcm))
except EOFError:
break | ||
s846568443 | p00005 | u024599888 | 1433402774 | Python | Python3 | py | Runtime Error | 0 | 0 | 211 | #!/usr/bin/env python3
while(True):
try:
a, b=map(int, input().split())
except EOFError:
break
gcd=0
for i in range(a):
if(a%i==0 and b%i==0):
gcd=i
lcm=a*b/gcd
print("{0} {1}".format(gcd, lcm)) | ||
s015027744 | p00005 | u873482706 | 1434196935 | Python | Python | py | Runtime Error | 0 | 0 | 806 | import sys
def main():
for input_line in sys.stdin:
num1 = int(input_line.split(' ')[0])
num2 = int(input_line.split(' ')[1])
if num1 <= num2:
dividend(num1, num2, num1)
elif num1 > num2:
dividend(num1, num2, num2)
result.sort(reverse=True)
greatest_common_divisor = result[0]
least_common_multiple = num1 * num2 / greatest_common_divisor
print('%s %s' % (greatest_common_divisor, least_common_multiple))
def dividend(num1, num2, num):
for i in range(num).sort(reverse=True):
divisor = i+1
if num1 % divisor == 0 and num2 % divisor == 0:
result.append(divisor)
break
if __name__ == '__main__':
result = []
main() | ||
s634460123 | p00005 | u300946041 | 1447940666 | Python | Python | py | Runtime Error | 0 | 0 | 673 | import sys
def gcd(a, b):
ret = None
if a <= b:
large = b
else:
large = a
for i in xrange(large, 0, -1):
if a % i == 0 and b % i == 0:
ret = i
break
return ret
def lcm(a, b):
ret = None
lst = [a, b]
while True:
if a == b:
ret = a
break
if a > b:
b += lst[1]
else:
a += lst[0]
return ret
def main():
#for line in sys.stdin.readlines():
for line in open('test.txt'):
a, b = [int(n) for n in line.split()]
print "{0} {1}".format(gcd(a, b), lcm(a, b))
if __name__ == '__main__':
main() | File "/tmp/tmpmv1f1eb1/tmp1qdx6ocp.py", line 35
print "{0} {1}".format(gcd(a, b), lcm(a, b))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s524531310 | p00005 | u609881501 | 1450261019 | Python | Python3 | py | Runtime Error | 0 | 0 | 355 | import sys
list = sys.stdin.readlines()
e=0
GCD = 0
def Euclide(a, b):
if b == 0:
return a
if a < b:
tmp = a
a = b
b = tmp
e = a%b
return Euclide(b, e)
def LCM(a, b, c):
return int(a/c*b)
for i in list:
a = i[0]
b = i[1]
GCD = Euclide(a, b)
print(str(GCD)+" "+str(LCM(a, b, GCD))) | ||
s606230429 | p00005 | u148101999 | 1458267858 | Python | Python | py | Runtime Error | 0 | 0 | 260 | import sys
def gcd(a,b):
if a == b:
return a
else:
return gcd(b, abs(a-b))
def lcm(a,b,g):
return a*b/g
if __name__ == "__main__":
for i in sys.stdin:
a,b = map(int, i.split())
print gcd(a,b),lcm(a,b,gcd(a,b)) | File "/tmp/tmpn8j3003p/tmptans1f_0.py", line 15
print gcd(a,b),lcm(a,b,gcd(a,b))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s389966479 | p00005 | u148101999 | 1458268759 | Python | Python | py | Runtime Error | 0 | 0 | 520 | #encoding=utf-8
import sys
printf = sys.stdout.write
ans = []
def gcd(a,b):
if a == b:
return a
else:
return gcd(b, abs(a-b))
def lcm(a,b,g):
return a*b/g
if __name__ == "__main__":
for i in sys.stdin:
a,b = map(int, i.split())
ans.append(gcd(a,b))
ans.append(lcm(a,b,gcd(a,b)))
for i in xrange(0,len(ans) - 2,2):
printf(str(ans[i]) + " " + str(ans[i + 1]) + "\n")
printf(str(ans[len(ans) - 2]) + " " + str(ans[len(ans) - 1])) | Traceback (most recent call last):
File "/tmp/tmp4qs3uamc/tmpmk29qzop.py", line 21, in <module>
for i in xrange(0,len(ans) - 2,2):
^^^^^^
NameError: name 'xrange' is not defined. Did you mean: 'range'?
| |
s601502961 | p00005 | u130979865 | 1459855133 | Python | Python | py | Runtime Error | 0 | 0 | 282 | # -*- coding: utf-8 -*-
import sys
def gcd(a, b):
global gcd
if b == 0:
gcd = a:
else:
gcd = gcd(b, a%b)
for line in sys.stdin:
gcd = 1
lcm = 1
a, b = map(int, line.split())
gcd(a, b)
lcm = a*b/gcd/gcd
print "%d %d" %(gcd, lcm) | File "/tmp/tmp_3u6ss93/tmpp25fjpms.py", line 8
gcd = a:
^
SyntaxError: invalid syntax
| |
s016207430 | p00005 | u264972437 | 1468336448 | Python | Python3 | py | Runtime Error | 0 | 0 | 222 | import math
import sys
for line in sys.stdin:
x,y = [int(s) for s in line.split(' ')]
g = math.gcd(x,y)
a = set()
b = set()
i = 1
while not a & b:
a = a | {x*i}
b = b | {y*i}
i += 1
ab = a & b
print(g,*ab) | ||
s541433749 | p00005 | u264972437 | 1468337818 | Python | Python3 | py | Runtime Error | 0 | 0 | 134 | import math
import sys
for line in sys.stdin:
x,y = [int(s) for s in line.split(' ')]
G = math.gcd(x,y)
L = int(x*y/G)
print(G,L) | ||
s087902876 | p00005 | u264972437 | 1468338540 | Python | Python3 | py | Runtime Error | 0 | 0 | 134 | import math
import sys
for line in sys.stdin:
x,y = [int(s) for s in line.split(' ')]
G = math.gcd(x,y)
L = int(x*y/G)
print(G,L) | ||
s406693833 | p00005 | u393305246 | 1474193317 | Python | Python | py | Runtime Error | 0 | 0 | 407 | mport sys
a = []
for line in sys.stdin:
a.append(line)
for n in a:
inl=n.split()
num1=inl[0]
check=1
list=[]
while check<=math.sqrt(num1):
if num1%check==0:
list.append(check)
check+=1
list.sort()
list.reverse()
num2=inl[1]
for i in list:
if num2%i==0:
gud=i
break
lcm==num1*num2/gud
print gud,lcm | File "/tmp/tmp8ry_pcs9/tmpv16xghf6.py", line 1
mport sys
^^^
SyntaxError: invalid syntax
| |
s198688149 | p00005 | u393305246 | 1474193384 | Python | Python | py | Runtime Error | 0 | 0 | 417 | mport sys
a = []
for line in sys.stdin:
a.append(line)
for n in a:
inl=n.split()
num1=int(inl[0])
check=1
list=[]
while check<=math.sqrt(num1):
if num1%check==0:
list.append(check)
check+=1
list.sort()
list.reverse()
num2=int(inl[1])
for i in list:
if num2%i==0:
gud=i
break
lcm==num1*num2/gud
print gud,lcm | File "/tmp/tmp310aect9/tmpn12hfuja.py", line 1
mport sys
^^^
SyntaxError: invalid syntax
| |
s714606347 | p00005 | u393305246 | 1474193469 | Python | Python | py | Runtime Error | 0 | 0 | 416 | mport sys
a = []
for line in sys.stdin:
a.append(line)
for n in a:
inl=n.split()
num1=int(inl[0])
check=1
list=[]
while check<=math.sqrt(num1):
if num1%check==0:
list.append(check)
check+=1
list.sort()
list.reverse()
num2=int(inl[1])
for i in list:
if num2%i==0:
gud=i
break
lcm=num1*num2/gud
print gud,lcm | File "/tmp/tmpzfqrdhcz/tmp3jzcnf71.py", line 1
mport sys
^^^
SyntaxError: invalid syntax
| |
s835933422 | p00005 | u813534019 | 1477155031 | Python | Python | py | Runtime Error | 0 | 0 | 9 | print 1 2 | File "/tmp/tmpi12n35eh/tmplwqklyyb.py", line 1
print 1 2
^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s938836977 | p00005 | u220324665 | 1478071997 | Python | Python3 | py | Runtime Error | 0 | 0 | 92 | import sys,math
for i in sys.stdin:x,y=map(int,i.split());g=math.gcd(x,y);print(g,x/g*y/g*g) | ||
s571457542 | p00005 | u220324665 | 1478072041 | Python | Python3 | py | Runtime Error | 0 | 0 | 96 | import sys,math
for i in sys.stdin:
x,y=map(int,i.split())
g=math.gcd(x,y)
print(g,x/g*y/g*g) | ||
s101222541 | p00005 | u220324665 | 1478072183 | Python | Python3 | py | Runtime Error | 0 | 0 | 99 | import sys
import math
for i in sys.stdin:
x,y=map(int,i.split())
g=math.gcd(x,y)
print(g,x*y/g) | ||
s450227726 | p00005 | u166871988 | 1478523872 | Python | Python3 | py | Runtime Error | 0 | 0 | 225 | def gcd(li):
a=max(li)
b=min(li)
while b>0:
a,b=b,a%b
return a
def lcm(li):
return li[0]*li[1]/gcd(li)
while True:
li=[int(i) for i in input().split(" ")]
print("%i %i"%(gcd(li),lcm(li))) | Traceback (most recent call last):
File "/tmp/tmpz0cds4l1/tmpvgu5l99b.py", line 12, in <module>
li=[int(i) for i in input().split(" ")]
^^^^^^^
EOFError: EOF when reading a line
| |
s583966633 | p00005 | u922871577 | 1479278901 | Python | Python | py | Runtime Error | 0 | 0 | 134 | import sys
from fractions import gcd
for line in sys.stdin:
a, b = map(int, raw_input().split())
print gcd(a, b), a*b/gcd(a,b) | File "/tmp/tmp83hgb5eu/tmpu4n09bp0.py", line 5
print gcd(a, b), a*b/gcd(a,b)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s183340157 | p00005 | u919202930 | 1479289802 | Python | Python3 | py | Runtime Error | 0 | 0 | 380 | def euclidean_algorithm(a,b):
if a == b: return(a)
if a > b: return(euclidean_algorithm(a-b,b))
if a < b: return(euclidean_algorithm(b-a,a))
inputs=[]
while True:
try:
inputs.append( list( map(int,input().split()) ) )
except EOFError:
break
for i in inputs:
gcd = euclidean_algorithm(i[0],i[1])
lcm = int(i[0]*i[1]/gcd)
print("{0} {1}".format(gcd,lcm)) | ||
s046384456 | p00005 | u919202930 | 1479289872 | Python | Python3 | py | Runtime Error | 0 | 0 | 380 | def euclidean_algorithm(a,b):
if a == b: return(a)
if a > b: return(euclidean_algorithm(a-b,b))
if a < b: return(euclidean_algorithm(b-a,a))
inputs=[]
while True:
try:
inputs.append( list( map(int,input().split()) ) )
except EOFError:
break
for i in inputs:
gcd = euclidean_algorithm(i[0],i[1])
lcm = int(i[0]*i[1]/gcd)
print("{0} {1}".format(gcd,lcm)) | ||
s791623298 | p00005 | u919202930 | 1479349705 | Python | Python3 | py | Runtime Error | 0 | 0 | 380 | def euclidean_algorithm(a,b):
if a == b: return(a)
if a > b: return(euclidean_algorithm(a-b,b))
if a < b: return(euclidean_algorithm(b-a,a))
inputs=[]
while True:
try:
inputs.append( list( map(int,input().split()) ) )
except EOFError:
break
for i in inputs:
gcd = euclidean_algorithm(i[0],i[1])
lcm = int(i[0]*i[1]/gcd)
print("{0} {1}".format(gcd,lcm)) | ||
s438334583 | p00005 | u919202930 | 1479349753 | Python | Python3 | py | Runtime Error | 0 | 0 | 391 | def euclidean_algorithm(a,b):
if a == b: return(a)
if a > b: return(euclidean_algorithm(a-b,b))
if a < b: return(euclidean_algorithm(b-a,a))
return 0
inputs=[]
while True:
try:
inputs.append( list( map(int,input().split()) ) )
except EOFError:
break
for i in inputs:
gcd = euclidean_algorithm(i[0],i[1])
lcm = int(i[0]*i[1]/gcd)
print("{0} {1}".format(gcd,lcm)) | ||
s606837780 | p00005 | u779577827 | 1479474185 | Python | Python3 | py | Runtime Error | 0 | 0 | 159 | import sys, math
[[print("{} {}".format(math.gcd(t[0], t[1]), t[0] * t[1] // math.gcd(t[0], t[1]))) for t in [[int(y) for y in x.split()]]] for x in sys.stdin] | ||
s134430697 | p00005 | u779577827 | 1479474403 | Python | Python3 | py | Runtime Error | 0 | 0 | 159 | import sys, math
[[print("{} {}".format(math.gcd(t[0], t[1]), t[0] * t[1] // math.gcd(t[0], t[1]))) for t in [[int(y) for y in x.split()]]] for x in sys.stdin] | ||
s467157496 | p00005 | u779577827 | 1479474459 | Python | Python3 | py | Runtime Error | 0 | 0 | 158 | import sys, math
[[print("{} {}".format(math.gcd(t[0], t[1]), t[0] * t[1] / math.gcd(t[0], t[1]))) for t in [[int(y) for y in x.split()]]] for x in sys.stdin] | ||
s087684598 | p00005 | u542645301 | 1479479326 | Python | Python3 | py | Runtime Error | 0 | 0 | 161 | import sys
from math import gcd
[print("{}{}".format(gcd(k[0], k[1]), k[0] * k[1] // gcd(k[0], k[1]))) for i in sys.stdin for k in [[int(j) for j in i.split()]]] | ||
s585304830 | p00005 | u542645301 | 1479479458 | Python | Python | py | Runtime Error | 0 | 0 | 166 | import sys
from fractions import gcd
[print("{}{}".format(gcd(k[0], k[1]), k[0] * k[1] // gcd(k[0], k[1]))) for i in sys.stdin for k in [[int(j) for j in i.split()]]] | Traceback (most recent call last):
File "/tmp/tmpjy_1qp19/tmp_k3jfi4w.py", line 2, in <module>
from fractions import gcd
ImportError: cannot import name 'gcd' from 'fractions' (/root/miniconda3/envs/sandbox-runtime/lib/python3.11/fractions.py)
| |
s379707155 | p00005 | u542645301 | 1479479686 | Python | Python3 | py | Runtime Error | 0 | 0 | 193 |
import sys
# from fractions import gcd
from math import gcd
[print("{} {}".format(gcd(k[0], k[1]), (k[0] * k[1]) // gcd(k[0], k[1]))) for i in sys.stdin for k in [[int(j) for j in i.split()]]] | ||
s948914526 | p00005 | u166860661 | 1480773246 | Python | Python | py | Runtime Error | 0 | 0 | 225 | #coding: utf-8
import sys
for line in sys.stdin:
l = (map(int,line.split()))
l.sort()
a = l[0]
b = l[1]
for i in range(2,b+1):
if a%i == 0 and b%i == 0:
ans = i:
print a*b/ans,ans | File "/tmp/tmplhs0fi9v/tmpp5ove6yo.py", line 12
ans = i:
^
SyntaxError: invalid syntax
| |
s841083724 | p00005 | u301729341 | 1481004143 | Python | Python3 | py | Runtime Error | 0 | 0 | 185 | import math
while True:
try:
a,b = map(int,input().split())
gcd = math.gcd(a,b)
lcm = a*b /gcd
print(gcd,int(lcm))
except EOFError:
break | ||
s851272164 | p00005 | u301729341 | 1481004350 | Python | Python3 | py | Runtime Error | 0 | 0 | 198 | import math
while True:
try:
a,b = map(int,input().split())
gcd = math.gcd(a,b)
lcm = a*b /gcd
print(gcd,int(lcm))
except (EOFError,ValueError):
break | ||
s067346580 | p00005 | u661290476 | 1481180094 | Python | Python3 | py | Runtime Error | 0 | 0 | 153 | from math import gcd
while True:
try:
a, b = map(int, input().split())
print(gcd(a, b), a * b // gcd(a, b))
except:
break | ||
s605819697 | p00005 | u661290476 | 1481180426 | Python | Python3 | py | Runtime Error | 0 | 0 | 142 | from math import gcd
while True:
try:
a,b=map(int,input().split())
print(gcd(a,b),a*b//gcd(a,b))
except:
break | ||
s853376219 | p00005 | u661290476 | 1482232055 | Python | Python3 | py | Runtime Error | 0 | 0 | 144 | from math import gcd
g=9.8
while True:
try:
a,b=map(int,input().split())
except:
break
print(gcd(a,b),a*b//gcd(a,b)) | ||
s807194065 | p00005 | u661290476 | 1482232497 | Python | Python3 | py | Runtime Error | 0 | 0 | 138 | from math import gcd
while True:
try:
a,b=map(int,input().split())
except:
break
print(gcd(a,b),a//gcd(a,b)*b) | ||
s034930206 | p00005 | u745277023 | 1484375284 | Python | Python3 | py | Runtime Error | 0 | 0 | 187 | import sys
def g(a,b):
return g(abs(a-b),a) if a%abs(a-b)!=0 else abs(a-b)
for line in sys.stdin.readlines():
a, b = map(int, line.split())
c = g(a, b)
print(c, a*b//c) | ||
s204940442 | p00005 | u745277023 | 1484375301 | Python | Python3 | py | Runtime Error | 0 | 0 | 198 | import sys
def g(a,b):
return g(abs(a-b),a) if a%abs(a-b)!=0 else abs(a-b)
sets = sys.stdin.readlines()
for line in sets:
a, b = map(int, line.split())
c = g(a, b)
print(c, a*b//c) | ||
s685652341 | p00005 | u745277023 | 1484375504 | Python | Python3 | py | Runtime Error | 0 | 0 | 208 | import sys
def g(a, b):
d = abs(a - b)
return g(d, a) if a % d != 0 else d
sets = sys.stdin.readlines()
for line in sets:
a, b = map(int, line.split())
c = g(a, b)
print(c, a * b // c) | ||
s541570647 | p00005 | u745277023 | 1484375680 | Python | Python3 | py | Runtime Error | 0 | 0 | 274 | import sys
def g(a, b):
d = abs(a - b)
return g(d, a) if a % d != 0 else d
def lcm(inta, intb, intgcd):
return (inta * intb // intgcd)
sets = sys.stdin.readlines()
for line in sets:
a, b = map(int, line.split())
c = g(a, b)
print(c, lcm(a,b,c)) | ||
s595581939 | p00005 | u745277023 | 1484375704 | Python | Python3 | py | Runtime Error | 0 | 0 | 280 | import sys
def g(inta, intb):
d = abs(a - b)
return g(d, a) if a % d != 0 else d
def lcm(inta, intb, intgcd):
return (inta * intb // intgcd)
sets = sys.stdin.readlines()
for line in sets:
a, b = map(int, line.split())
c = g(a, b)
print(c, lcm(a,b,c)) | ||
s347158915 | p00005 | u745277023 | 1484375720 | Python | Python3 | py | Runtime Error | 0 | 0 | 278 | import sys
def g(inta, intb):
d = abs(a - b)
return g(d, a) if a % d != 0 else d
def lcm(inta, intb, intgcd):
return inta * intb // intgcd
sets = sys.stdin.readlines()
for line in sets:
a, b = map(int, line.split())
c = g(a, b)
print(c, lcm(a,b,c)) | ||
s127497080 | p00005 | u745277023 | 1484375773 | Python | Python3 | py | Runtime Error | 0 | 0 | 280 | import sys
def g(inta, intb):
d = abs(a - b)
return g(d, a) if a % d != 0 else d
def lcm(inta, intb, intgcd):
return inta * intb // intgcd
sets = sys.stdin.readlines()
for line in sets:
a, b = map(int, line.split())
c = g(a, b)
print(c, lcm(a, b, c)) | ||
s405076595 | p00005 | u745277023 | 1484375844 | Python | Python3 | py | Runtime Error | 0 | 0 | 254 | import sys
def g(inta, intb):
d = abs(a - b)
return g(d, a) if a % d != 0 else d
def lcm(inta, intb, intgcd):
return inta * intb // intgcd
for line in sys.stdin:
a, b = map(int, line.split())
c = g(a, b)
print(c, lcm(a,b,c)) | ||
s011639709 | p00005 | u745277023 | 1484375944 | Python | Python3 | py | Runtime Error | 0 | 0 | 232 | import sys
def g(a, b):
d = abs(a - b)
return g(d, a) if a % d != 0 else d
def lcm(a, b, gcd):
return a * b // gcd
for line in sys.stdin:
a, b = map(int, line.split())
c = g(a, b)
print(c, lcm(a, b, c)) | ||
s164709991 | p00005 | u745277023 | 1484375972 | Python | Python3 | py | Runtime Error | 0 | 0 | 186 | import sys
def g(a, b):
d = abs(a - b)
return g(d, a) if a % d != 0 else d
for line in sys.stdin:
a, b = map(int, line.split())
c = g(a, b)
print(c, a * b // gcd) | ||
s566928483 | p00005 | u745277023 | 1484376142 | Python | Python3 | py | Runtime Error | 0 | 0 | 188 | import sys
def g(a, b):
d = abs(a - b)
return g(d, a) if a % d != 0 else d
for line in sys.stdin():
a, b = map(int, line.split())
c = g(a, b)
print(c, a * b // gcd) | Traceback (most recent call last):
File "/tmp/tmp3ftqdwhw/tmpinw51sqi.py", line 9, in <module>
for line in sys.stdin():
^^^^^^^^^^^
TypeError: '_io.TextIOWrapper' object is not callable
| |
s736152788 | p00005 | u301461168 | 1487753843 | Python | Python3 | py | Runtime Error | 0 | 0 | 645 | import sys
nums = []
for line in sys.stdin:
nums.append(line)
for i in range(len(nums)):
input_line = nums[i].split(" ")
a = long(input_line[0])
b = long(input_line[1])
#??¬?´???°?????????
common_div = []
#?????§??¬?´???°
if a < b:
last_num = a
else:
last_num = b
for j in range(1,last_num-1):
if a%j == 0 and b%j == 0:
#a???b???j??§???????????¨???
common_div.append(j)
max_common_div = common_div[len(common_div)-1]
min_common_mpl = int((a * b)/max_common_div)
print(str(max_common_div) + " " + str(min_common_mpl))
| ||
s277961873 | p00005 | u301461168 | 1487753894 | Python | Python3 | py | Runtime Error | 0 | 0 | 646 | import sys
nums = []
for line in sys.stdin:
nums.append(line)
for i in range(len(nums)):
input_line = nums[i].split(" ")
a = long(input_line[0])
b = long(input_line[1])
#??¬?´???°?????????
common_div = []
#?????§??¬?´???°
if a < b:
last_num = a
else:
last_num = b
for j in range(1,last_num-1):
if a%j == 0 and b%j == 0:
#a???b???j??§???????????¨???
common_div.append(j)
max_common_div = common_div[len(common_div)-1]
min_common_mpl = long((a * b)/max_common_div)
print(str(max_common_div) + " " + str(min_common_mpl))
| ||
s090272782 | p00005 | u301461168 | 1487754161 | Python | Python3 | py | Runtime Error | 0 | 0 | 643 | import sys
nums = []
for line in sys.stdin:
nums.append(line)
for i in range(len(nums)):
input_line = nums[i].split(" ")
a = int(input_line[0])
b = int(input_line[1])
#??¬?´???°?????????
common_div = []
#?????§??¬?´???°
if a < b:
last_num = a
else:
last_num = b
for j in range(1,last_num-1):
if a%j == 0 and b%j == 0:
#a???b???j??§???????????¨???
common_div.append(j)
max_common_div = common_div[len(common_div)-1]
min_common_mpl = int((a * b)/max_common_div)
print(str(max_common_div) + " " + str(min_common_mpl))
| ||
s953064430 | p00005 | u901080241 | 1488949588 | Python | Python3 | py | Runtime Error | 0 | 0 | 141 | import sys
import math
for line in sys.stdin:
a,b = map(int, line.split())
gc = math.gcd(a,b)
print("{} {}".format(gc, a*b//gc)) | ||
s554724703 | p00005 | u901080241 | 1488949668 | Python | Python3 | py | Runtime Error | 0 | 0 | 143 | import sys
import math
for line in sys.stdin:
a,b = map(int, line.split())
gc = math.gcd(a,b)
print("{0} {1}".format(gc, a*b//gc)) | ||
s178502922 | p00005 | u810591206 | 1489037744 | Python | Python3 | py | Runtime Error | 0 | 0 | 267 | import sys
def gcd(m, n):
r = m % n
if r == 0:
return n
else:
return gcd(n, r)
lines = sys.stdin.readlines()
for line in lines:
a, b = map(int, line.split())
m = max(a, b)
n = min(a, b)
print(gcd(m, n) m * n // gcd(m, n)) | File "/tmp/tmpywgvz9iz/tmpf5qryemb.py", line 15
print(gcd(m, n) m * n // gcd(m, n))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
SyntaxError: invalid syntax. Perhaps you forgot a comma?
| |
s813322694 | p00005 | u731896389 | 1489039332 | Python | Python3 | py | Runtime Error | 0 | 0 | 180 | import sys
def gcd(a,b):
while b:
a,b=b,a%b
return a
def lcm(a,b):
return a*b//gcd(a,b)
for line in sys.stdin:
a,b=line.split()
print(gcd(a,b),lcm(a,b)) | ||
s353918706 | p00005 | u731896389 | 1489039342 | Python | Python3 | py | Runtime Error | 0 | 0 | 183 | import sys
def gcd(a,b):
while b:
a,b=b,a%b
return a
def lcm(a,b):
return a*b//gcd(a,b)
for line in sys.stdin:
a,b=line.split(" ")
print(gcd(a,b),lcm(a,b)) | ||
s773406031 | p00005 | u073709667 | 1490542702 | Python | Python3 | py | Runtime Error | 0 | 0 | 257 | for j in range(50)
n=input().split()
num=[int(n[i]) for i in range(len(n))]
max=1
num=sorted(num)
for i in range(1,num[0]+1):
if num[0]%i==0:
if num[1]%i==0:
max=i
print(max,int(num[0]*num[1]/max)) | File "/tmp/tmplcq44bgq/tmpoaxik_1v.py", line 1
for j in range(50)
^
SyntaxError: expected ':'
| |
s614171218 | p00005 | u073709667 | 1490542722 | Python | Python3 | py | Runtime Error | 0 | 0 | 239 |
n=input().split()
num=[int(n[i]) for i in range(len(n))]
max=1
num=sorted(num)
for i in range(1,num[0]+1):
if num[0]%i==0:
if num[1]%i==0:
max=i
print(max,int(num[0]*num[1]/max)) | File "/tmp/tmpr2b6p41n/tmpa99dac21.py", line 2
n=input().split()
IndentationError: unexpected indent
| |
s172117646 | p00005 | u073709667 | 1490542736 | Python | Python3 | py | Runtime Error | 0 | 0 | 257 | for j in range(50)
n=input().split()
num=[int(n[i]) for i in range(len(n))]
max=1
num=sorted(num)
for i in range(1,num[0]+1):
if num[0]%i==0:
if num[1]%i==0:
max=i
print(max,int(num[0]*num[1]/max)) | File "/tmp/tmpvgxe7fdj/tmp9_8axnvz.py", line 1
for j in range(50)
^
SyntaxError: expected ':'
| |
s717303913 | p00005 | u518711553 | 1491489403 | Python | Python3 | py | Runtime Error | 0 | 0 | 175 | import sys
def gcd(x, y):
return gcd(y, y - x) if x != y else x
for i in sys.stdin:
a, b = sorted(list(map(int, i.split())))
g = gcd(a, b)
print(g, (a*b)//g) | ||
s432766782 | p00005 | u518711553 | 1491489420 | Python | Python3 | py | Runtime Error | 0 | 0 | 175 | import sys
def gcd(x, y):
return gcd(y, y - x) if x != y else x
for i in sys.stdin:
a, b = sorted(list(map(int, i.split())))
g = gcd(a, b)
print(g, (a*b)//g) | ||
s450918903 | p00005 | u518711553 | 1491489500 | Python | Python3 | py | Runtime Error | 0 | 0 | 179 | import sys
def gcd(x, y):
return gcd(y, y - x) if x != y else x
for i in sys.stdin:
a, b = sorted(list(map(int, i.split())))
g = gcd(a, b)
print(g, int((a*b)/g)) | ||
s669798144 | p00005 | u695154284 | 1493139050 | Python | Python3 | py | Runtime Error | 0 | 0 | 283 | def get_gcd(_a, _b):
if _a % _b == 0:
return _b
return get_gcd(_b, _a % _b)
if __name__ == '__main__':
while True:
a, b = list(map(int, input().split()))
gcd = get_gcd(a, b)
lcm = a * b / gcd
print(str(gcd) + " " + str(int(lcm))) | Traceback (most recent call last):
File "/tmp/tmpjhyp29e6/tmp25nwi0kp.py", line 9, in <module>
a, b = list(map(int, input().split()))
^^^^^^^
EOFError: EOF when reading a line
| |
s784860270 | p00005 | u362104929 | 1494587536 | Python | Python3 | py | Runtime Error | 0 | 0 | 522 | import math
def main():
def get_inputs():
input_list = []
try:
while True:
input_list.append(input())
except EOFError:
return input_list
input_list = get_inputs()
lcm = lambda a,b: a*b / math.gcd(a,b)
for str_num in input_list:
tmp = str_num.split(" ")
a,b = int(tmp[0]),int(tmp[1])
x = math.gcd(a,b)
y = int(lcm(a,b))
print("{} {}".format(x,y))
return None
if __name__ == '__main__':
main() | ||
s719692821 | p00005 | u362104929 | 1494587749 | Python | Python3 | py | Runtime Error | 0 | 0 | 522 | import math
def main():
def get_inputs():
input_list = []
try:
while True:
input_list.append(input())
except EOFError:
return input_list
input_list = get_inputs()
lcm = lambda a,b: a*b / math.gcd(a,b)
for str_num in input_list:
tmp = str_num.split(" ")
a,b = int(tmp[0]),int(tmp[1])
x = math.gcd(a,b)
y = int(lcm(a,b))
print("{} {}".format(x,y))
return None
if __name__ == '__main__':
main() | ||
s215193726 | p00005 | u362104929 | 1494588262 | Python | Python3 | py | Runtime Error | 0 | 0 | 573 | import math
def main():
def get_inputs():
input_list = []
count = 0
try:
while count < 50:
input_list.append(input())
count += 1
except EOFError:
return input_list
input_list = get_inputs()
lcm = lambda a,b: a*b / math.gcd(a,b)
for str_num in input_list:
tmp = str_num.split(" ")
a,b = int(tmp[0]),int(tmp[1])
x = math.gcd(a,b)
y = int(lcm(a,b))
print("{} {}".format(x,y))
return None
if __name__ == '__main__':
main() | ||
s656430966 | p00005 | u123596571 | 1494757081 | Python | Python3 | py | Runtime Error | 0 | 0 | 162 | def gcd(a,b):
while b:
a, b = b, a%b
return a
def lcm(a,b):
return a*b/gcd(a,b)
a,b = map(int, input().split())
print("{0:} {1:}".format(gcd(a,b), lcm(a,b)) | File "/tmp/tmpbetmhk_y/tmpd70beroy.py", line 9
print("{0:} {1:}".format(gcd(a,b), lcm(a,b))
^
SyntaxError: '(' was never closed
| |
s778613087 | p00005 | u123596571 | 1494757151 | Python | Python3 | py | Runtime Error | 0 | 0 | 160 | def gcd(a,b):
while b:
a, b = b, a%b
return a
def lcm(a,b):
return a*b/gcd(a,b)
a,b = map(int, input().split())
print("{0} {1}".format(gcd(a,b), lcm(a,b)) | File "/tmp/tmpm5dho3m4/tmpssawct_c.py", line 9
print("{0} {1}".format(gcd(a,b), lcm(a,b))
^
SyntaxError: '(' was never closed
| |
s845856631 | p00005 | u123596571 | 1494757391 | Python | Python3 | py | Runtime Error | 0 | 0 | 175 | def gcd(a,b):
while b:
a, b = b, a%b
return a
def lcm(a,b):
return a*b/gcd(a,b)
for i in input():
a,b = map(int, i.split())
print("{0} {1}".format(gcd(a,b),lcm(a,b))) | Traceback (most recent call last):
File "/tmp/tmplwjjjdj8/tmpu8mxg6yt.py", line 9, in <module>
for i in input():
^^^^^^^
EOFError: EOF when reading a line
| |
s321268042 | p00005 | u123596571 | 1494757516 | Python | Python3 | py | Runtime Error | 0 | 0 | 217 | def gcd(a,b):
while b > 0:
a, b = b, a%b
return a
def lcm(a,b):
return a*b/gcd(a,b)
for i in input():
a,b = map(int, i.split())
gcd_num = gcd(a,b)
lcm_num = lcm(a,b)
print("{0} {1}".format(gcd_num,lcm_num)) | Traceback (most recent call last):
File "/tmp/tmpqnpox4pa/tmpvp6u4po_.py", line 9, in <module>
for i in input():
^^^^^^^
EOFError: EOF when reading a line
| |
s823393248 | p00005 | u440180827 | 1496888013 | Python | Python3 | py | Runtime Error | 0 | 0 | 143 | import sys
import math
for line in sys.stdin:
a, b = map(int, line.split())
gcdab = math.gcd(a, b)
print(gcdab, int(a / gcdab * b)) | ||
s953621745 | p00005 | u440180827 | 1496888327 | Python | Python3 | py | Runtime Error | 0 | 0 | 139 | import sys
import math
for line in sys.stdin:
a, b = map(int, line.split())
gcdab = math.gcd(a, b)
print(gcdab, a // gcdab * b) | ||
s365171433 | p00005 | u440180827 | 1496889562 | Python | Python3 | py | Runtime Error | 0 | 0 | 269 | import sys
def gcd(a, b):
for i in range(1, a):
if a % i == 0:
t = a // i
if b % t == 0:
return t
for line in sys.stdin:
a, b = sorted(map(int, line.split()))
gcdab = gcd(a, b)
print(gcdab, a // gcdab * b) | ||
s061553740 | p00005 | u184989919 | 1500120481 | Python | Python3 | py | Runtime Error | 0 | 0 | 250 | def GcdLCM():
while 1:
x,y=map(int,input().split())
gcd = Gcd(x,y)
lcm = int(x*y/gcd)
print("{} {}".format(gcd,lcm))
def Gcd(x,y):
while x!=0:
x,y=y%x,x
return y
GcdLCM() | Traceback (most recent call last):
File "/tmp/tmptg9jdzzz/tmpzroxtw9m.py", line 16, in <module>
GcdLCM()
File "/tmp/tmptg9jdzzz/tmpzroxtw9m.py", line 4, in GcdLCM
x,y=map(int,input().split())
^^^^^^^
EOFError: EOF when reading a line
| |
s227324122 | p00005 | u184989919 | 1500120584 | Python | Python3 | py | Runtime Error | 0 | 0 | 297 | def GcdLCM():
while 1:
x,y=map(int,input().split())
if x==None:
break
gcd = Gcd(x,y)
lcm = int(x*y/gcd)
print("{} {}".format(gcd,lcm))
def Gcd(x,y):
while x!=0:
x,y=y%x,x
return y
GcdLCM() | Traceback (most recent call last):
File "/tmp/tmp3zs23scp/tmp14x2vysh.py", line 19, in <module>
GcdLCM()
File "/tmp/tmp3zs23scp/tmp14x2vysh.py", line 4, in GcdLCM
x,y=map(int,input().split())
^^^^^^^
EOFError: EOF when reading a line
| |
s413716175 | p00005 | u184989919 | 1500120654 | Python | Python3 | py | Runtime Error | 0 | 0 | 308 | def GcdLCM():
for line in sys.stdin:
x,y=map(int,line.split())
if x==None:
break
gcd = Gcd(x,y)
lcm = int(x*y/gcd)
print("{} {}".format(gcd,lcm))
def Gcd(x,y):
while x!=0:
x,y=y%x,x
return y
GcdLCM() | Traceback (most recent call last):
File "/tmp/tmpx9uffoqw/tmp0ii5sk5s.py", line 19, in <module>
GcdLCM()
File "/tmp/tmpx9uffoqw/tmp0ii5sk5s.py", line 3, in GcdLCM
for line in sys.stdin:
^^^
NameError: name 'sys' is not defined
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.