buggy
stringlengths
1
618k
fixed
stringlengths
16
618k
buggy_submission_id
stringlengths
10
10
fixed_submission_id
stringlengths
10
10
problem_id
stringlengths
6
6
lang
stringclasses
1 value
buggy_verdict
stringclasses
2 values
print(pow(int(input())), 3)
x = int(input()) y = 3 p = pow(x, y) print(p)
s880662986
s513910199
p02388
python
Runtime Error
x, y = [int(i) for i in input.split(" ")] print(x*y)
x,y = [int(i) for i in input().split()] area = x*y length = (x*2)+(y*2) print(area,length)
s817152953
s107957409
p02389
python
Runtime Error
input = [iint(i) for i in input().split(" ")] print(input[0]*input[1], input[0]*2+input[1]*2)
x,y = [int(i) for i in input().split()] area = x*y length = (x*2)+(y*2) print(area,length)
s552950738
s107957409
p02389
python
Runtime Error
x,y = [int(i) for i in input().split()] area = x*y length = (x*2)+(y*2) print(area+" "+length)
x,y = [int(i) for i in input().split()] area = x*y length = (x*2)+(y*2) print(area,length)
s074717450
s107957409
p02389
python
Runtime Error
while True: a = input() a = a.split(" ") b = [] for i in a: b.append(int(i)) if b[0] == 0 and b[1] == 0 and b[2] == 0 and b[3] == 0 and b[4] == 0: break c = input() c = c.split(" ") d = [] for i in c: d.append(int(i)) if b[4] == d[0]: print(0) ...
while True: n, a, b, c, x = map(int, input().split(" ")) if n == 0 and a == 0 and b == 0 and c == 0 and x == 0: break y = list(map(int, input().split(" "))) ans = 0 i = 0 while ans <= 10000: if x == y[i]: i += 1 if i == n: break x...
s746768889
s703701509
p01267
python
Runtime Error
while True: a = input() a = a.split(" ") b = [] for i in a: b.append(int(i)) if b[0] == 0 and b[1] == 0 and b[2] == 0 and b[3] == 0 and b[4] == 0: break c = input() c = c.split(" ") d = [] for i in c: d.append(int(i)) if b[4] == d[0]: print(0) ...
while True: n, a, b, c, x = map(int, input().split(" ")) if n == 0 and a == 0 and b == 0 and c == 0 and x == 0: break y = list(map(int, input().split(" "))) ans = 0 i = 0 while ans <= 10000: if x == y[i]: i += 1 if i == n: break x...
s528402281
s703701509
p01267
python
Runtime Error
while True: a = input() if a == "0 0 0 0 0": break a = a.split(" ") b = [] for i in a: b.append(int(i)) c = input() c = c.split(" ") d = [] for i in c: d.append(int(i)) if b[4] == d[0]: print(0) continue ans = 0 x = b[4] for i i...
while True: n, a, b, c, x = map(int, input().split(" ")) if n == 0 and a == 0 and b == 0 and c == 0 and x == 0: break y = list(map(int, input().split(" "))) ans = 0 i = 0 while ans <= 10000: if x == y[i]: i += 1 if i == n: break x...
s177100691
s703701509
p01267
python
Runtime Error
while True: a = input() if a == "0 0 0 0 0": break a = a.split(" ") b = [] for i in a: b.append(int(i)) c = input() c = c.split(" ") d = [] for i in c: d.append(int(i)) if b[4] == d[0]: print(0) continue ans = 0 x = b[4] for i i...
while True: n, a, b, c, x = map(int, input().split(" ")) if n == 0 and a == 0 and b == 0 and c == 0 and x == 0: break y = list(map(int, input().split(" "))) ans = 0 i = 0 while ans <= 10000: if x == y[i]: i += 1 if i == n: break x...
s022734444
s703701509
p01267
python
Runtime Error
while True: a = input() # if a == "0 0 0 0 0": # break a = a.split(" ") b = [] sum = 0 for i in a: b.append(int(i)) sum += int(i) print(sum) if sum == 0: break c = input() c = c.split(" ") d = [] for i in c: d.append(int(i)) if ...
while True: n, a, b, c, x = map(int, input().split(" ")) if n == 0 and a == 0 and b == 0 and c == 0 and x == 0: break y = list(map(int, input().split(" "))) ans = 0 i = 0 while ans <= 10000: if x == y[i]: i += 1 if i == n: break x...
s056381519
s703701509
p01267
python
Runtime Error
while True: a = input() # if a == "0 0 0 0 0": # break a = a.split(" ") b = [] sum = 0 for i in a: b.append(int(i)) sum += int(i) if sum == 0: break c = input() c = c.split(" ") d = [] for i in c: d.append(int(i)) if b[4] == d[0]: ...
while True: n, a, b, c, x = map(int, input().split(" ")) if n == 0 and a == 0 and b == 0 and c == 0 and x == 0: break y = list(map(int, input().split(" "))) ans = 0 i = 0 while ans <= 10000: if x == y[i]: i += 1 if i == n: break x...
s922100545
s703701509
p01267
python
Runtime Error
while True: a = input() # if a == "0 0 0 0 0": # break a = a.split(" ") b = [] sum = 0 for i in a: b.append(int(i)) sum += int(i) if sum == 0: break c = input() c = c.split(" ") d = [] for i in c: d.append(int(i)) if b[4] == d[0]: ...
a = int(input()) b = [] clo = True for i in range(a): b.append(input()) c = int(input()) for i in range(c): d = input() for j in range(a): if d == b[j]: know = True break else: know = False if know: if clo: clo = False ...
s822774265
s411374302
p01554
python
Runtime Error
values = [] i = 0 while True: values.append([int(x) for x in input().split()]) if [] == values[i] and 0 == len(values[i]): values.pop() break else: i += 1 sum = 0 digit = 0 for x, y in values: sum = x + y digit = 0 while sum >= 1: sum //= 10 digit += 1 ...
import sys values = [] for line in sys.stdin: values.append([int(x) for x in line.split()]) digit = 0 for x, y in values: sum = x + y; digit = 0 while sum >= 1: sum //= 10 digit += 1 print(digit)
s804045820
s447613266
p00002
python
Runtime Error
import sys values = [] for line in sys.stdin: values.append(int(line)) ans = [1 for i in range(10) for j in range(10) for k in range(10) for l in range(10) if n == i + j + k + l] print(ans.count(1))
import sys values = [] for line in sys.stdin: values.append(int(line)) for v in values: ans = [1 for i in range(10) for j in range(10) for k in range(10) for l in range(10) if v == i + j + k + l] print(ans.count(1))
s752482986
s778116591
p00008
python
Runtime Error
values = input() height, width = [int(x) for x in values.split()] print(' '.join(height * width, height * 2 + width * 2))
values = input() height, width = [int(x) for x in values.split()] print(height * width, height * 2 + width * 2)
s442214293
s098961731
p02389
python
Runtime Error
import math r = int(input()) ret = r * r * math.pi print('{0:.5f} {1:.5f}'.format(ret, ret))
import math r = float(input()) print('{0:.6f} {1:.6f}'.format(r * r * math.pi, (r + r) * math.pi))
s726319320
s034435890
p02400
python
Runtime Error
r = int(input()) ret = r * r * 3.141592 print('{0:.5f} {1:.5f}'.format(ret, ret))
import math r = float(input()) print('{0:.6f} {1:.6f}'.format(r * r * math.pi, (r + r) * math.pi))
s623140815
s034435890
p02400
python
Runtime Error
import math r = int(input()) ret = r * r * math.pi print('{0:.6f} {1:.6f}'.format(ret, ret))
import math r = float(input()) print('{0:.6f} {1:.6f}'.format(r * r * math.pi, (r + r) * math.pi))
s796355176
s034435890
p02400
python
Runtime Error
import math r = int(input()) print('{0:.6f} {1:.6f}'.format(r * r * math.pi, (r + r) * math.pi))
import math r = float(input()) print('{0:.6f} {1:.6f}'.format(r * r * math.pi, (r + r) * math.pi))
s944853053
s034435890
p02400
python
Runtime Error
def Input(): matrix = [] row, col = [int(x) for x in input().split()] i = row while i > 0: matrix.append([int(y) for y in input().split()]) i -= 1 return matrix def calcTotalOfRowAndCol(matrix): for l in matrix: total = 0 for val in l: total += val ...
def calcTotalOfRowAndCol(matrix, r, c): for l in matrix: total = 0 for val in l: total += val l.append(total) matrix.append([]) for i in range(c + 1): total = 0 j = 0 while j < r: total += matrix[j][i] j += 1 matrix[...
s042788513
s731601659
p02413
python
Runtime Error
def Input(): matrix = [] row, col = [int(x) for x in input().split()] i = row while i > 0: matrix.append([int(y) for y in input().split()]) i -= 1 return matrix def calcTotalOfRowAndCol(matrix): for l in matrix: total = 0 for val in l: total += val ...
def calcTotalOfRowAndCol(matrix, r, c): for l in matrix: total = 0 for val in l: total += val l.append(total) matrix.append([]) for i in range(c + 1): total = 0 j = 0 while j < r: total += matrix[j][i] j += 1 matrix[...
s872044445
s731601659
p02413
python
Runtime Error
a=input() print(a*a*a)
x=int(input()) print(x**3)
s350349273
s034120598
p02388
python
Runtime Error
a=input() b=a*a*a print(b)
x=int(input()) print(x**3)
s476035605
s034120598
p02388
python
Runtime Error
N=int(input()) count=0 for i in range(N): n=int(input()) s=2 for j in range(n): if (n==2): count+=1 break tmp=n%s if (tmp!=0): s+=1 if (s==n): count+=1 break else: break print(count)
import math def prime(n): if (n==2): return True if(n<2 or n%2==0): return False i=3 while(i<=math.sqrt(n)): if (n%i==0): return False i=i+2 return True N=int(input()) count=0 for i in range(N): n=int(input()) if(prime(n)): count+=1 print(...
s849728256
s980962552
p02257
python
Time Limit Exceeded
N=int(input()) count=0 for i in range(N): n=int(input()) s=2 for j in range(n): if (n==2): count+=1 break tmp=n%s if (tmp!=0): s+=1 if (s==n): count+=1 break else: break print(count)
import math def prime(n): if (n==2): return True if(n<2 or n%2==0): return False i=3 while(i<=math.sqrt(n)): if (n%i==0): return False i=i+2 return True N=int(input()) count=0 for i in range(N): n=int(input()) if(prime(n)): count+=1 print(...
s769812375
s980962552
p02257
python
Time Limit Exceeded
N=int(input()) count=0 for i in range(N): n=int(input()) s=2 for j in range(n): if (n==2): count+=1 break tmp=n%s if (tmp!=0): s+=1 if (s==n): count+=1 break else: break print(count)
import math def prime(n): if (n==2): return True if(n<2 or n%2==0): return False i=3 while(i<=math.sqrt(n)): if (n%i==0): return False i=i+2 return True N=int(input()) count=0 for i in range(N): n=int(input()) if(prime(n)): count+=1 print(...
s365121228
s980962552
p02257
python
Time Limit Exceeded
while True: _=input() if _ == '-': break for i in range(int(input())): l=int(input()) _=_[l:]+[:l] print(_)
while True: _=input() if _ == '-': break for i in range(int(input())): l=int(input()) _=_[l:]+_[:l] print(_)
s668695185
s117800897
p02420
python
Runtime Error
a = list(map(int,input().split())) a.sort() for i in range(1,4): print(a[-i])
a = [] for i in range(10): a.append(int(input())) a.sort() for j in range(3): print(a[-(j+1)])
s147103555
s894690754
p00001
python
Runtime Error
a = list(map(int,input().split())) a.sort() print(a[-1]) print(a[-2]) print(a[-3])
a = [] for i in range(10): a.append(int(input())) a.sort() for j in range(3): print(a[-(j+1)])
s576567468
s894690754
p00001
python
Runtime Error
import math a,b,c,d = map(int,input().split()) e = math.sqrt((c-a)**2+(d-b)**2) print(e)
from math import sqrt a,b,c,d = map(float,input().split()) print(sqrt((c-a)**2+(d-b)**2))
s945227926
s121779063
p02379
python
Runtime Error
import math a,b,c,d = map(int,input().split()) e = math.sqrt((c-a)**2+(d-b)**2) print(e)
from math import sqrt a,b,c,d = map(float,input().split()) print(sqrt((c-a)**2+(d-b)**2))
s748683239
s121779063
p02379
python
Runtime Error
import math a,b,c,d = map(int,input().split()) e = math.sqrt((c-a)**2+(d-b)**2) print(e)
from math import sqrt a,b,c,d = map(float,input().split()) print(sqrt((c-a)**2+(d-b)**2))
s391818926
s121779063
p02379
python
Runtime Error
import math a,b,c,d = map(int,input().split()) print(math.sqrt((c-a)**2+(d-b)**2))
from math import sqrt a,b,c,d = map(float,input().split()) print(sqrt((c-a)**2+(d-b)**2))
s319182688
s121779063
p02379
python
Runtime Error
from math import sqrt a,b,c,d = map(int,input().split()) print(math.sqrt((c-a)**2+(d-b)**2))
from math import sqrt a,b,c,d = map(float,input().split()) print(sqrt((c-a)**2+(d-b)**2))
s957594102
s121779063
p02379
python
Runtime Error
from math import sqrt a,b,c,d = map(int,input().split()) print(sqrt((c-a)**2+(d-b)**2))
from math import sqrt a,b,c,d = map(float,input().split()) print(sqrt((c-a)**2+(d-b)**2))
s544220590
s121779063
p02379
python
Runtime Error
input(i) print(i**3)
x = input() print(int(x)**3)
s899386239
s000405051
p02388
python
Runtime Error
input(i) print(i**3)
x = input() print(int(x)**3)
s962171866
s000405051
p02388
python
Runtime Error
x=int(input()) y=int(input()) print(x*y)
x,y = map(int,input().split()) print(x*y,(x+y)*2)
s535688968
s227047685
p02389
python
Runtime Error
import math r = int(input()) print("%d %d"%(math.pi*r*r,2*math.pi*r))
import math r = float(input()) print("%f %f"%(math.pi*r*r,2*math.pi*r))
s324823172
s156673001
p02400
python
Runtime Error
even = "#." * 151 odd = ".#" * 151 while 1: h,w = map(int,input().split()) if h == w ==0: break for i in range(h//2): print(even[:w]) print(odd[:w]) if h%2 != 0: print(even[:w])
even = "#." * 151 odd = ".#" * 151 while 1: h,w = map(int,input().split()) if h == w ==0: break for i in range(h//2): print(even[:w]) print(odd[:w]) if h%2 != 0: print(even[:w]) print()
s350829109
s678673430
p02405
python
Runtime Error
n = int(input()) num = list(map(int,input().split())) for i in range(n): print(num[n-i-1],end = " ")
n =int(input()) a = list(map(int,input().split())) a.reverse() for i in range(n): if i!=n-1: print(a[i],end=" ") else: print(a[i])
s820710186
s642686834
p02407
python
Runtime Error
n = int(input()) num = list(map(int,input().split())) num.reverse() for i in range(n-1): print(num[i],end = " ") print(num[n-1])
n =int(input()) a = list(map(int,input().split())) a.reverse() for i in range(n): if i!=n-1: print(a[i],end=" ") else: print(a[i])
s071335339
s642686834
p02407
python
Runtime Error
n,m=map(int,input().split()) A =[[int(i) for i in input().split()] for j in range(n)] b = [] for i in range(m): b.append(int(input())) ans = [0,0,0] for i in range(n): for j in range(m): ans += A[i][j]*b[j] print(ans)
n,m=map(int,input().split()) A =[[int(i) for i in input().split()] for j in range(n)] b = [] for i in range(m): b.append(int(input())) ans = [0 for i in range(n)] for i in range(n): for j in range(m): ans[i] += A[i][j]*b[j] for i in ans: print(i)
s693435161
s577138881
p02410
python
Runtime Error
n,m=map(int,input().split()) A =[[int(i) for i in input().split()] for j in range(n)] b = [] for i in range(m): b.append(int(input())) ans = [0 for i in range(m)] for i in range(n): for j in range(m): ans[i] += A[i][j]*b[j] for i in ans: print(i))
n,m=map(int,input().split()) A =[[int(i) for i in input().split()] for j in range(n)] b = [] for i in range(m): b.append(int(input())) ans = [0 for i in range(n)] for i in range(n): for j in range(m): ans[i] += A[i][j]*b[j] for i in ans: print(i)
s861128037
s577138881
p02410
python
Runtime Error
cnt = 0 s = input().lower() while 1: W = input().lower().split() if W == "END_OF_TEXT": break elif W == s: cnt += 1 print(cnt)
cnt = 0 s = input().lower() while 1: line = input() if line == "END_OF_TEXT": break for w in line.lower().split(): if w == s: cnt+=1 print(cnt)
s758489010
s435687086
p02419
python
Runtime Error
cnt = 0 s = input().lower() while 1: W = input().split().lower if W == "END_OF_TEXT": break elif W == s: cnt += 1 print(cnt)
cnt = 0 s = input().lower() while 1: line = input() if line == "END_OF_TEXT": break for w in line.lower().split(): if w == s: cnt+=1 print(cnt)
s971834466
s435687086
p02419
python
Runtime Error
cnt = 0 s = input().lower() while 1: line = input() if W == "END_OF_TEXT": break for s in line.lower().split(): print(cnt)
cnt = 0 s = input().lower() while 1: line = input() if line == "END_OF_TEXT": break for w in line.lower().split(): if w == s: cnt+=1 print(cnt)
s212760136
s435687086
p02419
python
Runtime Error
cnt = 0 s = input().lower() while 1: line = input() if line == "END_OF_TEXT": break for s in line.lower().split(): print(cnt)
cnt = 0 s = input().lower() while 1: line = input() if line == "END_OF_TEXT": break for w in line.lower().split(): if w == s: cnt+=1 print(cnt)
s030952769
s435687086
p02419
python
Runtime Error
ap,bp = 0 n = int(input()) for i in range(n): a,b = input().split() if a>b: ap+=3 elif a==b: bp+=3 else: bp+=3 print(ap,bp)
ap,bp = 0,0 n = int(input()) for i in range(n): a,b = input().split() if a>b: ap+=3 elif a==b: ap+=1 bp+=1 else: bp+=3 print(ap,bp)
s021645416
s984396774
p02421
python
Runtime Error
inp = input() a = [input() for i in range(inp)] a.sort() a.reverse() print(a[0]) print(a[1]) print(a[2])
import sys a = [] for line in sys.stdin: a.append(int(line)) a.sort() a.reverse() print(a[0]) print(a[1]) print(a[2])
s140704890
s521298732
p00001
python
Runtime Error
inp = input() a = [input() for i in range(int(inp))] a.sort() a.reverse() print(a[0]) print(a[1]) print(a[2])
import sys a = [] for line in sys.stdin: a.append(int(line)) a.sort() a.reverse() print(a[0]) print(a[1]) print(a[2])
s566464074
s521298732
p00001
python
Runtime Error
inp = input() a = [input() for i in range(int(inp))] a.sort() a.reverse() print(a[0]) print(a[1]) print(a[2])
import sys a = [] for line in sys.stdin: a.append(int(line)) a.sort() a.reverse() print(a[0]) print(a[1]) print(a[2])
s773740591
s521298732
p00001
python
Runtime Error
def ge(arr): for i in range(len(arr)): tmp = int(arr[i]) if tmp >= 4: tmp += 1 if tmp >= 6: tmp += 1 arr[i] = str(tmp) while True: n = int(input) if n == 0: break print("".join(ge(list(oct(n))[2:])))
def ge(arr): for i in range(len(arr)): tmp = int(arr[i]) if tmp >= 4: tmp += 1 if tmp >= 6: tmp += 1 arr[i] = str(tmp) return arr while True: n = int(input()) if n == 0: break print("".join(ge(list(oct(n))[2:])))
s656682715
s353464604
p00208
python
Runtime Error
import copy (h, w, n) = list(map(int, input().split())) dis = [[] for i in range(n + 1)] def setArr(ph): global dis res = [False for i in range(w + 2)] for i, x in enumerate(list(input())): if x == "X": continue res[i + 1] = True if x == ".": continue ...
import copy (h, w, n) = list(map(int, input().split())) dis = [[] for i in range(n + 1)] def setArr(ph): global dis res = [False for i in range(w + 2)] for i, x in enumerate(list(input())): if x == "X": continue res[i + 1] = True if x == ".": continue ...
s212897917
s369998183
p00481
python
Runtime Error
import math while True: line = input().split(" ") if(len(line) != 2): exit() a = int(line[0]) b = int(line[1]) print(int(math.log10(a+b))+1)
import math while True: try: line = input().split(" ") print(int(math.log10(int(line[0])+int(line[1])))+1) except: break
s078732134
s598403116
p00002
python
Runtime Error
#import math while True: line = input().split(" ") if(len(line) != 2): exit() a = int(line[0]) b = int(line[1]) print(int(math.log10(a+b))+1)
import math while True: try: line = input().split(" ") print(int(math.log10(int(line[0])+int(line[1])))+1) except: break
s783930892
s598403116
p00002
python
Runtime Error
import numpy.math while True: line = input().split(" ") if(len(line) != 2): exit() a = int(line[0]) b = int(line[1]) print(int(math.log10(a+b))+1)
import math while True: try: line = input().split(" ") print(int(math.log10(int(line[0])+int(line[1])))+1) except: break
s314316469
s598403116
p00002
python
Runtime Error
import math while True: line = input().split(" ") if(len(line) != 2): break a = int(line[0]) b = int(line[1]) print(int(math.log10(a+b))+1)
import math while True: try: line = input().split(" ") print(int(math.log10(int(line[0])+int(line[1])))+1) except: break
s220630087
s598403116
p00002
python
Runtime Error
n=input() for i in range(0,n): ????????num=map(int, raw_input().split()) ????????num.sort() ????????a=num[0] ????????b=num[1] ????????c=num[2] ????????if c*c==a*a+b*b: ????????????????print ("YES") ????????else: ????????????????print ("NO")
import sys for i in sys.stdin: try: sidelen = [int(j) for j in i.split(" ")] sidelen.sort(reverse=True) if(sidelen[0]**2 == sidelen[1]**2 + sidelen[2]**2): print("YES") else: print("NO") except: continue
s770095891
s681694688
p00003
python
Runtime Error
n=input() for i in range(0,n): ????????num=map(int, input().split()) ????????num.sort() ????????a=num[0] ????????b=num[1] ????????c=num[2] ????????if c*c==a*a+b*b: ????????????????print ("YES") ????????else: ????????????????print ("NO")
import sys for i in sys.stdin: try: sidelen = [int(j) for j in i.split(" ")] sidelen.sort(reverse=True) if(sidelen[0]**2 == sidelen[1]**2 + sidelen[2]**2): print("YES") else: print("NO") except: continue
s297431762
s681694688
p00003
python
Runtime Error
# This program computes GCD and LCM # -*- coding: utf-8 import sys def gcd(a, b): g = 1 for i in range(1, max([a, b])): if(a % i == 0 and b % i == 0): g = i return g def lcm(a, b): for i in range(max([a, b]), a*b + 1): if(i % a == 0 and i % b == 0): return i ...
# This program computes GCD and LCM # -*- coding: utf-8 import sys def gcd(a, b): while b != 0: a, b = b, a % b return a for i in sys.stdin: try: line = [int(k) for k in i.split(" ")] g = gcd(min(line), max(line)) print(str(g) + " " + str(line[0]*line[1]//g)) except: ...
s983207009
s919354997
p00005
python
Time Limit Exceeded
# This program computes GCD and LCM # -*- coding: utf-8 import sys def gcd(a, b): for i in range(max([a, b]), 0, -1): if(a % i == 0 and b % i == 0): return i return 1 def lcm(a, b): for i in range(max([a, b]), a*b + 1): if(i % a == 0 and i % b == 0): return i ...
# This program computes GCD and LCM # -*- coding: utf-8 import sys def gcd(a, b): while b != 0: a, b = b, a % b return a for i in sys.stdin: try: line = [int(k) for k in i.split(" ")] g = gcd(min(line), max(line)) print(str(g) + " " + str(line[0]*line[1]//g)) except: ...
s146570775
s919354997
p00005
python
Time Limit Exceeded
# This program computes GCD and LCM # -*- coding: utf-8 import sys def gcd(a, b): while True: tmpb = b b = a % b a = tmpb if(b == 1): break return a def lcm(a, b): for i in range(max([a, b]), a*b + 1): if(i % a == 0 and i % b == 0): return ...
# This program computes GCD and LCM # -*- coding: utf-8 import sys def gcd(a, b): while b != 0: a, b = b, a % b return a for i in sys.stdin: try: line = [int(k) for k in i.split(" ")] g = gcd(min(line), max(line)) print(str(g) + " " + str(line[0]*line[1]//g)) except: ...
s126222994
s919354997
p00005
python
Runtime Error
# This program computes GCD and LCM # -*- coding: utf-8 import sys def gcd(a, b): while True: tmpb = b b = a % b a = tmpb if(b == 1): break return a def lcm(a, b): for i in range(max([a, b]), a*b + 1): if(i % a == 0 and i % b == 0): return ...
# This program computes GCD and LCM # -*- coding: utf-8 import sys def gcd(a, b): while b != 0: a, b = b, a % b return a for i in sys.stdin: try: line = [int(k) for k in i.split(" ")] g = gcd(min(line), max(line)) print(str(g) + " " + str(line[0]*line[1]//g)) except: ...
s657627522
s919354997
p00005
python
Runtime Error
# This program computes GCD and LCM # -*- coding: utf-8 import sys def gcd(a, b): while True: tmpb = b b = a % b a = tmpb if(b == 1): break return a def lcm(a, b): for i in range(max([a, b]), a*b + 1): if(i % a == 0 and i % b == 0): return ...
# This program computes GCD and LCM # -*- coding: utf-8 import sys def gcd(a, b): while b != 0: a, b = b, a % b return a for i in sys.stdin: try: line = [int(k) for k in i.split(" ")] g = gcd(min(line), max(line)) print(str(g) + " " + str(line[0]*line[1]//g)) except: ...
s001809194
s919354997
p00005
python
Runtime Error
# This program computes GCD and LCM # -*- coding: utf-8 import sys def gcd(a, b): while b: a, b = b, a % b return a def lcm(a, b): for i in range(max([a, b]), a*b + 1): if(i % a == 0 and i % b == 0): return i return a*b for i in sys.stdin: try: line = [int(k) for k...
# This program computes GCD and LCM # -*- coding: utf-8 import sys def gcd(a, b): while b != 0: a, b = b, a % b return a for i in sys.stdin: try: line = [int(k) for k in i.split(" ")] g = gcd(min(line), max(line)) print(str(g) + " " + str(line[0]*line[1]//g)) except: ...
s270440845
s919354997
p00005
python
Runtime Error
ef Round(ip, dg): # ip???dg?????§?????¨?????\????????¢??° ip = ip / 10**dg if(ip-int(ip) != 0): return (int(ip) + 1)*10**dg else: return int(ip)*10**dg n=int(input()) sum=100000 for i in range(0, n): sum=Round(sum*1.05) print(sum)
def Round(ip, dg): # ip???dg?????§?????¨?????\????????¢??° ip = ip / 10**dg if(ip-int(ip) != 0): return (int(ip) + 1)*10**dg else: return int(ip)*10**dg n=int(input()) sum=100000 for i in range(0, n): sum=Round(sum*1.05, 3) print(sum)
s506402109
s698247144
p00007
python
Runtime Error
while(True): try: weight = float(input()) if(weight <= 48.00): print("light fly") elif(weight <= 51.00): print("fly") elif(weight <= 54.00): print("bantam") elif(weight <= 57.00): print("feather") elif(weight <= 60.00):...
# AOJ 0048 # Class # 5/1/2019 min = 40.00 max = 150.00 measure = [min, 48.00, 51.00, 54.00, 57.00, 60.00, 64.00, 69.00, 75.00, 81.00, 91.00, max] className = ['light fly', 'fly', 'bantam', 'feather', 'light', 'light welter', 'welter', 'light middle', ...
s040075443
s048882792
p00048
python
Runtime Error
while 1: try: weight = float(input()) if(weight <= 48.00): print("light fly") elif(weight <= 51.00): print("fly") elif(weight <= 54.00): print("bantam") elif(weight <= 57.00): print("feather") elif(weight <= 60.00): ...
# AOJ 0048 # Class # 5/1/2019 min = 40.00 max = 150.00 measure = [min, 48.00, 51.00, 54.00, 57.00, 60.00, 64.00, 69.00, 75.00, 81.00, 91.00, max] className = ['light fly', 'fly', 'bantam', 'feather', 'light', 'light welter', 'welter', 'light middle', ...
s777091276
s048882792
p00048
python
Runtime Error
r=float(input()) string=str(r**2*3.141592)+" "+str(2*3.141592*r) print(string)
a=list(map(int,input().split())) string=str(a[0]//a[1])+" "+str(a[0]%a[1])+" "+str("%.10f"%(a[0]/a[1])) print(string)
s356033453
s186278663
p02399
python
Runtime Error
a=list(map(int,input().split())) string=str(a[0]**2*3.141592)+" "+str(2*3.141592*a[0]) print(string)
import math r=float(input()) string=str(r**2*math.pi)+" "+str(2*math.pi*r) print(string)
s854227608
s249270996
p02400
python
Runtime Error
#include <iostream> using namespace std; int main(void){ int a, b, c; cin >> a >> b >> c; if(a < b && b < c) { cout << "Yes" << endl; } else { cout << "No" << endl; } }
a,b,c = map(int, input().split()) if a<b and b<c: print("Yes") else: print("No")
s977986897
s730991761
p02392
python
Runtime Error
def get_input(): while True: try: yield ''.join(raw_input()) except EOFError: break ar = [0] * 50 for i in range(10): for j in range(10): for k in range(10): for l in range(10): ar[i + j + k + l] += 1 for a in list(get_input()): print ar[int(a)]
def get_input(): while True: try: yield ''.join(raw_input()) except EOFError: break ar = [0] * 51 for i in range(10): for j in range(10): for k in range(10): for l in range(10): ar[i + j + k + l] += 1 for a in list(get_input()): print ar[int(a)]
s452630748
s393160760
p00008
python
Runtime Error
import sys def cross(a, b): return (a.conjugate() * b).real def dot(a, b): return (a.conjugate() * b).imag def ccw(a, b, c): x = b - a y = c - a; if cross(x, y) > 0: return 1 if cross(x, y) < 0: return -1 if dot(x, y) < 0: return 2 if abs(x) < abs(y): return -2 return 0 def solve(l, p): x = ccw(l[0][0], l[...
import sys def cross(a, b): return (a.conjugate() * b).imag def dot(a, b): return (a.conjugate() * b).real def ccw(a, b, c): x = b - a y = c - a; cr = cross(x, y) if cr != 0: return cr if dot(x, y) < 0: return 2 if abs(x) < abs(y): return -2 return 0 for line in sys.stdin: t = map(float, line.split()) if len...
s772048376
s315807957
p00012
python
Runtime Error
import sys def cross(a, b): return (a.conjugate() * b).real def dot(a, b): return (a.conjugate() * b).imag def ccw(a, b, c): x = b - a y = c - a; if cross(x, y) > 0: return 1 if cross(x, y) < 0: return -1 if dot(x, y) < 0: return 2 if abs(x) < abs(y): return -2 return 0 def solve(l, p): x = ccw(l[0][0], l[...
import sys def cross(a, b): return (a.conjugate() * b).imag def dot(a, b): return (a.conjugate() * b).real def ccw(a, b, c): x = b - a y = c - a; cr = cross(x, y) if cr != 0: return cr if dot(x, y) < 0: return 2 if abs(x) < abs(y): return -2 return 0 for line in sys.stdin: t = map(float, line.split()) if len...
s953870444
s315807957
p00012
python
Runtime Error
import sys def cross(a, b): return (a.conjugate() * b).real def dot(a, b): return (a.conjugate() * b).imag def ccw(a, b, c): x = b - a y = c - a; if cross(x, y) > 0: return 1 if cross(x, y) < 0: return -1 if dot(x, y) < 0: return 2 if abs(x) < abs(y): return -2 return 0 def solve(l, p): x = ccw(l[0][0], l[...
import sys def cross(a, b): return (a.conjugate() * b).imag def dot(a, b): return (a.conjugate() * b).real def ccw(a, b, c): x = b - a y = c - a; cr = cross(x, y) if cr != 0: return cr if dot(x, y) < 0: return 2 if abs(x) < abs(y): return -2 return 0 for line in sys.stdin: t = map(float, line.split()) if len...
s114968465
s315807957
p00012
python
Runtime Error
#!/usr/bin/env python #-*- coding:utf-8 -*- while True: n = input() if n == 0: break a = [ input() for i in xrange(n) ] m = -100000 for i in xrange(n): for j in xrange(n + 1): m = max(m, sum(a[i:j])) print m
#!/usr/bin/env python #-*- coding:utf-8 -*- while True: n = input() if n == 0: break a = [ input() for i in xrange(n) ] m = -100000 for i in xrange(n): s = 0 for j in xrange(i, n): s += a[j] m = max(m, s) print m
s725030760
s040309228
p00022
python
Time Limit Exceeded
import sys patterns = [[1, 2, 1, 2, 1, 4, 1, 4], [1, 2, 1, 4, 1, 4, 1, 2], [1, 4, 1, 4, 1, 2, 1, 2], [2, 1, 2, 1, 4, 1, 4, 1], [2, 1, 4, 1, 4, 1, 2, 1], [4, 1, 2, 1, 2, 1, 4, 1], [4, 1, 4, 1, 2, 1, 2, 1], ] for line in sys.stdin: p = [int(x) for x in line.split()] m = sum(p) pt = None for ptn in patterns: ...
import sys patterns = [ [1, 2, 1, 2, 1, 4, 1, 4], [1, 2, 1, 4, 1, 4, 1, 2], [1, 4, 1, 2, 1, 2, 1, 4], [1, 4, 1, 4, 1, 2, 1, 2], [2, 1, 2, 1, 4, 1, 4, 1], [2, 1, 4, 1, 4, 1, 2, 1], [4, 1, 2, 1, 2, 1, 4, 1], [4, 1, 4, 1, 2, 1, 2, 1], ] while True: try: p = [int(x) for x in raw_input().split()] m = 999999999...
s762670977
s659874455
p00082
python
Runtime Error
import sys patterns = [[1, 2, 1, 2, 1, 4, 1, 4], [1, 2, 1, 4, 1, 4, 1, 2], [1, 4, 1, 4, 1, 2, 1, 2], [2, 1, 2, 1, 4, 1, 4, 1], [2, 1, 4, 1, 4, 1, 2, 1], [4, 1, 2, 1, 2, 1, 4, 1], [4, 1, 4, 1, 2, 1, 2, 1], ] for line in sys.stdin: if not line: continue p = [int(x) for x in line.split()] m = sum(p) pt = None ...
import sys patterns = [ [1, 2, 1, 2, 1, 4, 1, 4], [1, 2, 1, 4, 1, 4, 1, 2], [1, 4, 1, 2, 1, 2, 1, 4], [1, 4, 1, 4, 1, 2, 1, 2], [2, 1, 2, 1, 4, 1, 4, 1], [2, 1, 4, 1, 4, 1, 2, 1], [4, 1, 2, 1, 2, 1, 4, 1], [4, 1, 4, 1, 2, 1, 2, 1], ] while True: try: p = [int(x) for x in raw_input().split()] m = 999999999...
s715427564
s659874455
p00082
python
Runtime Error
#!/usr/bin/env python #-*- coding:utf-8 -*- import heapq while True: # 割引券,駅,路線,スタート,ゴール c, n, m, s, d = map(int, raw_input().split()) if not (c or n or m or s or d): break field = {} for i in xrange(m): a, b, f = map(int, raw_input().split()) field[(a, b)] = f; field[(b, a)] = f; visited = set() q = [] ...
#!/usr/bin/env python #-*- coding:utf-8 -*- import heapq while True: # 割引券,駅,路線,スタート,ゴール c, n, m, s, d = map(int, raw_input().split()) if not (c or n or m or s or d): break field = {} for i in xrange(m): a, b, f = map(int, raw_input().split()) field[(a, b)] = field[(b, a)] = f; visited = {} q = [] heapq.he...
s894723015
s704478979
p00212
python
Time Limit Exceeded
#!/usr/bin/env python #-*- coding:utf-8 -*- import heapq while True: # 割引券,駅,路線,スタート,ゴール c, n, m, s, d = map(int, raw_input().split()) if not (c or n or m or s or d): break field = {} for i in xrange(m): a, b, f = map(int, raw_input().split()) field[(a, b)] = f; field[(b, a)] = f; visited = {} q = [] hea...
#!/usr/bin/env python #-*- coding:utf-8 -*- import heapq while True: # 割引券,駅,路線,スタート,ゴール c, n, m, s, d = map(int, raw_input().split()) if not (c or n or m or s or d): break field = {} for i in xrange(m): a, b, f = map(int, raw_input().split()) field[(a, b)] = field[(b, a)] = f; visited = {} q = [] heapq.he...
s439085181
s704478979
p00212
python
Time Limit Exceeded
while True: n, m = (int(x) for x in raw_input().split(" ")) if n == 0 and m == 0: break p = [int(x) for x in raw_input().split(" ")] s = sum(p) p.sort(reverse=True) for x in p[m - 1::m]: s -= x print s
while True: try: n, m = (int(x.strip()) for x in raw_input().split()) if n == 0 and m == 0: break p = [int(x.strip()) for x in raw_input().split()] s = sum(p) p.sort(reverse=True) for x in p[m - 1::m]: s -= x print s except: pass
s885249519
s331073980
p00227
python
Runtime Error
while True: n, m = (int(x) for x in raw_input().split()) if n == 0 and m == 0: break p = [int(x) for x in raw_input().split()] s = sum(p) p.sort(reverse=True) for x in p[m - 1::m]: s -= x print s
while True: try: n, m = (int(x.strip()) for x in raw_input().split()) if n == 0 and m == 0: break p = [int(x.strip()) for x in raw_input().split()] s = sum(p) p.sort(reverse=True) for x in p[m - 1::m]: s -= x print s except: pass
s958954438
s331073980
p00227
python
Runtime Error
while True: n, m = (int(x.strip()) for x in raw_input().split()) if n == 0 and m == 0: break p = [int(x.strip()) for x in raw_input().split()] s = sum(p) p.sort(reverse=True) for x in p[m - 1::m]: s -= x print s
while True: try: n, m = (int(x.strip()) for x in raw_input().split()) if n == 0 and m == 0: break p = [int(x.strip()) for x in raw_input().split()] s = sum(p) p.sort(reverse=True) for x in p[m - 1::m]: s -= x print s except: pass
s007878210
s331073980
p00227
python
Runtime Error
from itertools import permutations while True: n = input() if n == 0: break k = input() nums = [raw_input() for i in xrange(n)] result = set("".join(p) for p in permutations(nums, k)) print len(result)
import sys from itertools import permutations def main(): while True: line = raw_input() if line == "0 0": break n = int(line) k = input() nums = [raw_input().strip() for i in xrange(n)] result = set(["".join(p) for p in permutations(nums, k)]) print (len(result)) if __name__ == '__main__': sys.exit(...
s642827987
s384440792
p00469
python
Runtime Error
from itertools import permutations while True: n = input() k = input() if n == k == 0: break nums = [raw_input() for i in xrange(n)] result = set("".join(p) for p in permutations(nums, k)) print len(result)
import sys from itertools import permutations def main(): while True: line = raw_input() if line == "0 0": break n = int(line) k = input() nums = [raw_input().strip() for i in xrange(n)] result = set(["".join(p) for p in permutations(nums, k)]) print (len(result)) if __name__ == '__main__': sys.exit(...
s501333884
s384440792
p00469
python
Runtime Error
from itertools import permutations while True: n = int(raw_input().strip()) k = int(raw_input().strip()) if n == k == 0: break nums = [raw_input().strip() for i in xrange(n)] result = set("".join(p) for p in permutations(nums, k)) print len(result)
import sys from itertools import permutations def main(): while True: line = raw_input() if line == "0 0": break n = int(line) k = input() nums = [raw_input().strip() for i in xrange(n)] result = set(["".join(p) for p in permutations(nums, k)]) print (len(result)) if __name__ == '__main__': sys.exit(...
s317281631
s384440792
p00469
python
Runtime Error
from itertools import permutations while True: n = int(raw_input().strip()) k = int(raw_input().strip()) if n == k == 0: break nums = [raw_input().strip() for i in xrange(n)] result = set(["".join(p) for p in permutations(nums, k)]) print len(result)
import sys from itertools import permutations def main(): while True: line = raw_input() if line == "0 0": break n = int(line) k = input() nums = [raw_input().strip() for i in xrange(n)] result = set(["".join(p) for p in permutations(nums, k)]) print (len(result)) if __name__ == '__main__': sys.exit(...
s386329876
s384440792
p00469
python
Runtime Error
while True: n = int(raw_input().strip()) k = int(raw_input().strip()) if n == k == 0: break nums = [raw_input().strip() for i in xrange(n)] print 0
import sys from itertools import permutations def main(): while True: line = raw_input() if line == "0 0": break n = int(line) k = input() nums = [raw_input().strip() for i in xrange(n)] result = set(["".join(p) for p in permutations(nums, k)]) print (len(result)) if __name__ == '__main__': sys.exit(...
s435834863
s384440792
p00469
python
Runtime Error
from itertools import permutations while True: n = input() k = input() if n == k == 0: break nums = [raw_input().strip() for i in xrange(n)] result = set(["".join(p) for p in permutations(nums, k)]) print(len(result))
import sys from itertools import permutations def main(): while True: line = raw_input() if line == "0 0": break n = int(line) k = input() nums = [raw_input().strip() for i in xrange(n)] result = set(["".join(p) for p in permutations(nums, k)]) print (len(result)) if __name__ == '__main__': sys.exit(...
s796362694
s384440792
p00469
python
Runtime Error
import sys from itertools import permutations while True: n = input() k = input() if n == k == 0: sys.exit(0) nums = [raw_input().strip() for i in xrange(n)] result = set(["".join(p) for p in permutations(nums, k)]) print(len(result))
import sys from itertools import permutations def main(): while True: line = raw_input() if line == "0 0": break n = int(line) k = input() nums = [raw_input().strip() for i in xrange(n)] result = set(["".join(p) for p in permutations(nums, k)]) print (len(result)) if __name__ == '__main__': sys.exit(...
s978886653
s384440792
p00469
python
Runtime Error
import sys from itertools import permutations def main(): while True: n = input() k = input() if n == k == 0: return 0 nums = [raw_input().strip() for i in xrange(n)] result = set(["".join(p) for p in permutations(nums, k)]) print (len(result)) if __name__ == '__main__': sys.exit(main())
import sys from itertools import permutations def main(): while True: line = raw_input() if line == "0 0": break n = int(line) k = input() nums = [raw_input().strip() for i in xrange(n)] result = set(["".join(p) for p in permutations(nums, k)]) print (len(result)) if __name__ == '__main__': sys.exit(...
s087184729
s384440792
p00469
python
Runtime Error
import sys from itertools import permutations def main(): while True: n, k = map(int, raw_input().split()) if n == k == 0: sys.exit(0) nums = [raw_input().strip() for i in xrange(n)] result = set(["".join(p) for p in permutations(nums, k)]) print (len(result)) if __name__ == '__main__': sys.exit(main()...
import sys from itertools import permutations def main(): while True: line = raw_input() if line == "0 0": break n = int(line) k = input() nums = [raw_input().strip() for i in xrange(n)] result = set(["".join(p) for p in permutations(nums, k)]) print (len(result)) if __name__ == '__main__': sys.exit(...
s218009346
s384440792
p00469
python
Runtime Error
import sys from itertools import permutations def main(): while True: n = input() k = input() if n == k == 0: sys.exit(0) for i in xrange(n): input() # nums = [raw_input().strip() for i in xrange(n)] # result = set(["".join(p) for p in permutations(nums, k)]) # print (len(result)) if __name__ == '__...
import sys from itertools import permutations def main(): while True: line = raw_input() if line == "0 0": break n = int(line) k = input() nums = [raw_input().strip() for i in xrange(n)] result = set(["".join(p) for p in permutations(nums, k)]) print (len(result)) if __name__ == '__main__': sys.exit(...
s611252533
s384440792
p00469
python
Runtime Error
class TerminalNode(object): def __init__(self, value): self.index = int(value) self.value = value def __call__(self, assign): return self.value def printTree(self, visited=set(), indent=0): print("\t" * indent, self) def _getNextThen(self, index): return self def _getNextElse(self, index): return self...
#!/usr/bin/env python #-*- coding:utf-8 -*- import sys sys.setrecursionlimit(10000) class TerminalNode(object): def __init__(self, value): self.index = int(value) self.value = value def __call__(self, assign): return self.value def printTree(self, visited=set(), indent=0): print "\t" * indent, self def _g...
s626226104
s859845713
p01515
python
Runtime Error
#!/usr/bin/env python #-*- coding:utf-8 -*- import sys sys.setrecursionlimit(10000) class TerminalNode(object): def __init__(self, value): self.index = int(value) self.value = value def __call__(self, assign): return self.value def printTree(self, visited=set(), indent=0): print "\t" * indent, self def _g...
#!/usr/bin/env python #-*- coding:utf-8 -*- import sys sys.setrecursionlimit(10000) class TerminalNode(object): def __init__(self, value): self.index = int(value) self.value = value def __call__(self, assign): return self.value def printTree(self, visited=set(), indent=0): print "\t" * indent, self def _g...
s087269363
s859845713
p01515
python
Runtime Error
import re white = re.compile('(1*)$') black = re.compile('(0*)$') while True: n = int(raw_input()) if n == 0: break s = '' for i in xrange(n): if (i + 1) % 2 != 0: s += raw_input() else: p = raw_input() if p == '0': m = wh...
while True: n = int(raw_input()) if n == 0: break li = [] for i in xrange(n): p = int(raw_input()) if i == 0: li.append([p, 1]) continue # odd if i % 2 == 0: if li[-1][0] == p: li[-1][1] += 1 else: ...
s819483580
s613917340
p00450
python
Time Limit Exceeded
from copy import deepcopy while True: m = int(raw_input()) n = int(raw_input()) if m == 0 and n == 0: break begin = [[False] * m for y in xrange(n)] for y in xrange(n): line = map(int, raw_input().split(' ')) for x in xrange(m): if line[x] == 1: ...
from copy import deepcopy while True: m = int(raw_input()) n = int(raw_input()) if m == 0 and n == 0: break field = [[False] * m for y in xrange(n)] for y in xrange(n): line = map(int, raw_input().split(' ')) for x in xrange(m): if line[x] == 1: ...
s468250312
s552709735
p00458
python
Time Limit Exceeded
from copy import deepcopy from array import array while True: m = int(raw_input()) n = int(raw_input()) if m == 0 and n == 0: break begin = [array('b', [False] * m) for y in xrange(n)] for y in xrange(n): line = map(int, raw_input().split(' ')) for x in xrange(m): ...
from copy import deepcopy while True: m = int(raw_input()) n = int(raw_input()) if m == 0 and n == 0: break field = [[False] * m for y in xrange(n)] for y in xrange(n): line = map(int, raw_input().split(' ')) for x in xrange(m): if line[x] == 1: ...
s113693903
s552709735
p00458
python
Time Limit Exceeded
a,b = map(int, raw_input()) print a/b, a%b, float(a)/b
a,b = map(int, raw_input().split()) print "%d %d %.5f" % (a/b, a%b, float(a)/b)
s579859591
s828869775
p02399
python
Runtime Error
from math import pi x = int(raw_input()) print '%.6f %.6f' % (pi * x * x, pi * 2 * x)
from math import pi x = float(raw_input()) print '%.6f %.6f' % (pi * x * x, pi * 2 * x)
s366766275
s636388373
p02479
python
Runtime Error