Datasets:

problem_id
stringlengths
6
6
buggy_code
stringlengths
8
526k
fixed_code
stringlengths
12
526k
labels
listlengths
0
15
⌀
buggy_submission_id
int64
1
1.54M
fixed_submission_id
int64
2
1.54M
user_id
stringlengths
10
10
language
stringclasses
8 values
p02631
n=int(input()) a=list(map(int,input().split())) p=0 for x in a: p^=x ans=[] for x in a: ans.append(p^x) print(ans)
n=int(input()) a=list(map(int,input().split())) p=0 for x in a: p^=x ans=[] for x in a: ans.append(p^x) print(*ans)
[ "call.arguments.change" ]
346,221
346,222
u296150111
python
p02631
n=int(input()) a=list(map(int, input().split())) xor=[] for i in range(n-1): xor.append(a[i]^a[i+1]) f=0 for i in range(0,len(xor),2): f^=xor[i] first=f^a[0] ans=[first] k=first print(first,end=' ') for i in xor: print(k^i,end=' ') k=i
n=int(input()) a=list(map(int, input().split())) xor=[] for i in range(n-1): xor.append(a[i]^a[i+1]) f=0 for i in range(0,len(xor),2): f^=xor[i] first=f^a[0] ans=[first] k=first print(first,end=' ') for i in xor: print(k^i,end=' ') k=k^i
[ "assignment.change" ]
346,225
346,226
u135832955
python
p02632
def main(sample_file = ''): """ convenient functions # for i, a in enumerate(iterable) # q, mod = divmod(a, b) # divmod(x, y) returns the tuple (x//y, x%y) # Higher-order function: reduce(operator.mul, xyz_count, 1) # manage median(s) using two heapq https://atcoder.jp/contests/abc127/tasks/abc...
def main(sample_file = ''): """ convenient functions # for i, a in enumerate(iterable) # q, mod = divmod(a, b) # divmod(x, y) returns the tuple (x//y, x%y) # Higher-order function: reduce(operator.mul, xyz_count, 1) # manage median(s) using two heapq https://atcoder.jp/contests/abc127/tasks/abc...
[ "assignment.value.change", "expression.operation.binary.change", "call.arguments.change" ]
346,259
346,260
u988402778
python
p02632
def COMinit(): fac[0] = fac[1] = 1 finv[0] = finv[1] = 1 inv[1] = 1 for i in range(2,max): fac[i] = fac[i-1]*i%mod inv[i] = mod - inv[mod%i]*(mod//i)%mod finv[i] = finv[i-1]*inv[i]%mod def COM(n,k): if n < k: return 0 if n < 0 or k < 0: return 0 retur...
def COMinit(): fac[0] = fac[1] = 1 finv[0] = finv[1] = 1 inv[1] = 1 for i in range(2,max): fac[i] = fac[i-1]*i%mod inv[i] = mod - inv[mod%i]*(mod//i)%mod finv[i] = finv[i-1]*inv[i]%mod def COM(n,k): if n < k: return 0 if n < 0 or k < 0: return 0 retur...
[ "assignment.value.change", "identifier.change", "call.function.change" ]
346,267
346,268
u367794409
python
p02631
n = int(input()) lis = list(map(int, input().split())) s = 0 for i in lis: s = s^i lis = list(map(lambda x: str(-(-s^x)), lis)) st = ' '.join(lis) print(st)
n = int(input()) lis = list(map(int, input().split())) s = 0 for i in lis: s = s^i lis = list(map(lambda x: str(s^x), lis)) st = ' '.join(lis) print(st)
[ "call.arguments.change" ]
346,301
346,302
u306033313
python
p02631
N = int(input()) A = list(map(int, input().split())) s = 0 for a in A: s ^= a print(s) ans = [] for a in A: ans += [str(a ^ s)] print(' ' .join(ans))
N = int(input()) A = list(map(int, input().split())) s = 0 for a in A: s ^= a ans = [] for a in A: ans += [str(a ^ s)] print(' ' .join(ans))
[ "call.remove" ]
346,310
346,311
u364774090
python
p02631
n=int(input()) arr=list(map(int,input().split())) xors=0 for val in arr: xors^=val ans=[] for i in range(n): ans.append(xors^arr[i]) print(ans)
n=int(input()) arr=list(map(int,input().split())) xors=0 for val in arr: xors^=val ans=[] for i in range(n): ans.append(xors^arr[i]) print(*ans)
[ "call.arguments.change" ]
346,328
346,329
u163320134
python
p02631
import numpy as np N = int(input()) a = np.fromstring(input(), sep=" ", dtype=np.int64) b = np.bitwise_xor.reduce(a) c = np.bitwise_xor(a, 0) print(*c, sep=" ")
import numpy as np N = int(input()) a = np.fromstring(input(), sep=" ", dtype=np.int64) b = np.bitwise_xor.reduce(a) c = np.bitwise_xor(a, b) print(*c, sep=" ")
[ "assignment.value.change", "identifier.replace.add", "literal.replace.remove", "call.arguments.change" ]
346,331
346,332
u860038009
python
p02632
from collections import defaultdict, deque, Counter from heapq import heappush, heappop, heapify import math import bisect import random from itertools import permutations, accumulate, combinations, product import sys import string from bisect import bisect_left, bisect_right from math import factorial, ceil, floor, gc...
from collections import defaultdict, deque, Counter from heapq import heappush, heappop, heapify import math import bisect import random from itertools import permutations, accumulate, combinations, product import sys import string from bisect import bisect_left, bisect_right from math import factorial, ceil, floor, gc...
[ "assignment.value.change", "identifier.change", "expression.operation.binary.change" ]
346,562
346,563
u499381410
python
p02632
mod=10**9+7 k=int(input()) s=input() n=len(s) c=1 t=1 ans=0 m=10**20 for i in range(k+1): ans+=c*t if ans>m:ans%=mod c*=(n+k-i)*pow(i+1,mod-2,mod) if c>m:c%=mod t*=25 if t>m:t%=mod print(ans)
mod=10**9+7 k=int(input()) s=input() n=len(s) c=1 t=1 ans=0 m=10**20 for i in range(k+1): ans+=c*t if ans>m:ans%=mod c*=(n+k-i)*pow(i+1,mod-2,mod) if c>m:c%=mod t*=25 if t>m:t%=mod print(ans%mod)
[ "expression.operation.binary.add" ]
346,668
346,669
u227082700
python
p02633
x = int(input()) for i in range(1, 360): if (x*i)%360 == 0: print(i) exit()
x = int(input()) for i in range(1, 360+1): if (x*i)%360 == 0: print(i) exit()
[ "control_flow.loop.range.bounds.upper.change", "expression.operation.binary.add" ]
347,193
347,194
u694665829
python
p02632
from sys import stdin input = stdin.readline def nCr(n,r): return fact[n]*(inv[n-r]%M)*(inv[r]%M) M = 1000000007 k = int(input()) s = len(input()) t = k+s fact = [1] p25 = [1] for i in range(1,t+1): fact += [(fact[-1] * i)%M] if i<=k: p25 += [(p25[-1] * 25) % M] inv = [1]*(t+1) inv[t] = pow(fact[t...
from sys import stdin input = stdin.readline def nCr(n,r): return fact[n]*(inv[n-r]%M)*(inv[r]%M) M = 1000000007 k = int(input()) s = len(input().strip()) t = k+s fact = [1] p25 = [1] for i in range(1,t+1): fact += [(fact[-1] * i)%M] if i<=k: p25 += [(p25[-1] * 25) % M] inv = [1]*(t+1) inv[t] = po...
[ "call.add" ]
347,067
347,068
u151341340
python
p02632
import sys K = int(sys.stdin.readline()) M = len(sys.stdin.readline()) N = K+M mod = 10**9+7 ans = pow(26, N, mod) class Data(): def __init__(self): self.power = 1 self.rev = 1 class Combi(): def __init__(self, N, mod): self.lists = [Data() for _ in range(N+1)] self.mod = mo...
import sys K = int(sys.stdin.readline()) M = len(sys.stdin.readline())-1 N = K+M mod = 10**9+7 ans = pow(26, N, mod) class Data(): def __init__(self): self.power = 1 self.rev = 1 class Combi(): def __init__(self, N, mod): self.lists = [Data() for _ in range(N+1)] self.mod = ...
[ "assignment.change" ]
347,110
347,111
u780962115
python
p02633
x = int(input()) if 360 % x == 0: print(360 // x) else: common = 360 * x // math.gcd(360, x) ans = common // x print(ans)
import math x = int(input()) if 360 % x == 0: print(360 // x) else: common = 360 * x // math.gcd(360, x) ans = common // x print(ans)
[]
347,225
347,226
u896791216
python
p02633
X = int(input()) K = 0 while ((X * K) % 360 != 0) and (K == 0): K += 1 print(K)
X = int(input()) K = 0 while ((X * K) % 360 != 0) or (K == 0): K += 1 print(K)
[ "control_flow.loop.condition.change" ]
347,227
347,228
u500823377
python
p02633
import numpy as np X = int(input()) X_lcm = np.lcm(360, 360-X) print(X_lcm // X)
import numpy as np X = int(input()) X_lcm = np.lcm(360, X) print(X_lcm // X)
[ "expression.operation.binary.remove" ]
347,229
347,230
u557792847
python
p02633
a=int(input()) x = 0 i = 1 while(1): x += a i += 1 x %= 360 if x: continue else: print(i) quit()
a=int(input()) x = 0 i = 0 while(1): x += a i += 1 x %= 360 if x: continue else: print(i) quit()
[ "literal.number.integer.change", "assignment.value.change" ]
347,231
347,232
u329865314
python
p02633
X=int(input()) K=0 a=0 while True: a+=X K+=1 if K%360==0: break print(K)
X=int(input()) K=0 a=0 while True: a+=X K+=1 if a%360==0: break print(K)
[ "identifier.change", "control_flow.branch.if.condition.change" ]
347,259
347,260
u658905620
python
p02633
x = int(input()) def lcm(x, y): return (x * y) // math.gcd(x, y) print(lcm(x, 360)//x)
import math x = int(input()) def lcm(x, y): return (x * y) // math.gcd(x, y) print(lcm(x, 360)//x)
[]
347,277
347,278
u212328220
python
p02633
from math import gcd x = int(input()) print(360*gcd(x,360)//x)
from math import gcd x = int(input()) print(360*(x//gcd(x,360))//x)
[ "call.arguments.change" ]
347,293
347,294
u784120390
python
p02633
import sys readline = sys.stdin.readline MOD = 10 ** 9 + 7 INF = float('INF') sys.setrecursionlimit(10 ** 5) def main(): x = int(readline()) for i in range(1, 361): if ((180 - x) * i) % 360 == 0: return print(i) if __name__ == '__main__': main()
import sys readline = sys.stdin.readline MOD = 10 ** 9 + 7 INF = float('INF') sys.setrecursionlimit(10 ** 5) def main(): x = int(readline()) for i in range(1, 361): if (x * i) % 360 == 0: return print(i) if __name__ == '__main__': main()
[ "control_flow.loop.for.condition.change", "control_flow.branch.if.condition.change" ]
347,299
347,300
u261103969
python
p02633
import math x=int(input()) if 360%x==0: print(360//x) else: print(x * 360 // math.gcd(x, 360))
import math x=int(input()) if 360%x==0: print(360//x) else: print(360 // math.gcd(x, 360))
[ "expression.operation.binary.remove" ]
347,312
347,313
u371409687
python
p02633
x=int(input("")) import math a=math.gcd(360,x) print(int(360*x/a/a))
x=int(input("")) import math a=math.gcd(360,x) print(int(360/a))
[ "expression.operation.binary.remove" ]
347,314
347,315
u455408345
python
p02633
def lcm(x, y): if x > y: greater = x else: greater = y while(True): if((greater % x == 0) and (greater % y == 0)): lcm = greater break greater += 1 return lcm num1 = int(input()) a=lcm(num1,360) b=a/360 print(int(b))
def lcm(x, y): if x > y: greater = x else: greater = y while(True): if((greater % x == 0) and (greater % y == 0)): lcm = greater break greater += 1 return lcm num1 = int(input()) a=lcm(num1,360) b=a/num1 print(int(b))
[ "assignment.value.change", "identifier.replace.add", "literal.replace.remove", "expression.operation.binary.change" ]
347,324
347,325
u624455250
python
p02633
def lcm(x, y): if x > y: greater = x else: greater = y while(True): if((greater % x == 0) and (greater % y == 0)): lcm = greater break greater += 1 return lcm num1 = int(input()) a=lcm(num1,360) b=a/360 print(b)
def lcm(x, y): if x > y: greater = x else: greater = y while(True): if((greater % x == 0) and (greater % y == 0)): lcm = greater break greater += 1 return lcm num1 = int(input()) a=lcm(num1,360) b=a/num1 print(int(b))
[ "assignment.value.change", "identifier.replace.add", "literal.replace.remove", "expression.operation.binary.change", "call.arguments.add", "call.arguments.change" ]
347,326
347,325
u624455250
python
p02633
from math import gcd N = int(input()) print(N // gcd(360, N))
from math import gcd X = int(input()) print(360 // gcd(360, X))
[ "assignment.variable.change", "identifier.change", "identifier.replace.remove", "literal.replace.add", "call.arguments.change", "expression.operation.binary.change", "io.output.change" ]
347,327
347,328
u112629957
python
p02633
def solve(x): k = 0 while k*x % 360 != 0: k += 1 return k x = int(input()) print(solve(x))
def solve(x): k = 1 while k*x % 360 != 0: k += 1 return k x = int(input()) print(solve(x))
[ "literal.number.integer.change", "assignment.value.change" ]
347,331
347,332
u879309973
python
p02633
x = int(input()) for i in range(100000): if x * i % 360 == 0: print(i) exit()
x = int(input()) for i in range(1, 100000): if x * i % 360 == 0: print(i) exit()
[ "call.arguments.add" ]
347,339
347,340
u981931040
python
p02633
from math import gcd X = int(input()) print(360//gcd(X,180))
from math import gcd X = int(input()) print(360//gcd(X,360))
[ "literal.number.integer.change", "call.arguments.change", "expression.operation.binary.change", "io.output.change" ]
347,352
347,353
u497952650
python
p02633
import math x=int(input()) print(360//math.gcd(x,180))
import math n=int(input()) print(360//math.gcd(n,360))
[ "assignment.variable.change", "identifier.change", "call.arguments.change", "expression.operation.binary.change", "io.output.change", "literal.number.integer.change" ]
347,354
347,355
u046158516
python
p02633
import math x=int(input()) print(360//math.gcd(x,180))
import math x=int(input()) print(360//math.gcd(x,360))
[ "literal.number.integer.change", "call.arguments.change", "expression.operation.binary.change", "io.output.change" ]
347,354
347,356
u046158516
python
p02633
x = int(input()) s = x * 360 / math.gcd(x, 360) print(s/x)
import math x = int(input()) s = x * 360 / math.gcd(x, 360) print(int(s//x))
[ "call.add", "expression.operator.arithmetic.change", "call.arguments.change", "expression.operation.binary.change", "io.output.change" ]
347,363
347,364
u272457181
python
p02633
x = int(input()) for i in range(1, 360 + 1): if i * x == 360: print(i) exit(0)
x = int(input()) for i in range(1, 360 + 1): if i * x % 360 == 0: print(i) exit(0)
[ "control_flow.branch.if.condition.change", "control_flow.loop.for.condition.change" ]
347,376
347,377
u126823513
python
p02633
n=int(input()) print(int(360/math.gcd(n,360)))
import math n=int(input()) print(int(360/math.gcd(n,360)))
[]
347,389
347,390
u066494348
python
p02633
#!/usr/bin/env python3 X = int(input()) index = 1 while True: if X * index % 180 == 0: print(index*2) break index += 1
#!/usr/bin/env python3 X = int(input()) index = 1 while True: if X * index % 360 == 0: print(index) break index += 1
[ "literal.number.integer.change", "control_flow.branch.if.condition.change", "expression.operation.binary.remove" ]
347,426
347,427
u998733244
python
p02633
x = int(input()) k = 1 d = 180 - x while d % 360 != 0: k += 1 d += 180 - x print(k)
x = int(input()) k = 1 d = x while d % 360 != 0: k += 1 d += x print(k)
[ "expression.operation.binary.remove" ]
347,431
347,432
u408620326
python
p02633
X = int(input()) K=1 y=X % 360 while y != 0: K+=1 y=(y+X)% 360 # print(k)
X = int(input()) K=1 y=X % 360 while y != 0: K+=1 y=(y+X)% 360 # print(K)
[ "identifier.change", "call.arguments.change", "io.output.change" ]
347,446
347,447
u537142137
python
p02633
x = int(input()) for i in range(1000): if x * (i+1) == 360: print(i+1) exit()
x = int(input()) for i in range(1000): if x * (i+1) % 360 == 0: print(i+1) exit()
[ "control_flow.branch.if.condition.change", "control_flow.loop.for.condition.change" ]
347,448
347,449
u228223940
python
p02633
import sys import math import itertools import bisect from copy import copy from collections import deque,Counter from decimal import Decimal def s(): return input() def i(): return int(input()) def S(): return input().split() def I(): return map(int,input().split()) def L(): return list(input().split()) def l(): retur...
import sys import math import itertools import bisect from copy import copy from collections import deque,Counter from decimal import Decimal def s(): return input() def i(): return int(input()) def S(): return input().split() def I(): return map(int,input().split()) def L(): return list(input().split()) def l(): retur...
[ "call.add", "call.arguments.change" ]
347,450
347,451
u514118270
python
p02633
import math y = int(input()) print(y*360//math.gcd(y,360))
import math y = int(input()) print(360//math.gcd(y,360))
[ "expression.operation.binary.remove" ]
347,481
347,482
u035885928
python
p02633
X = int(input) ans = 0 while(1): ans += 1 if (X * ans) % 360 == 0: print(ans) break
X = int(input()) ans = 0 while(1): ans += 1 if (X * ans) % 360 == 0: print(ans) break
[ "call.add" ]
347,489
347,490
u885634168
python
p02633
import sys sys.setrecursionlimit(10**9) def mi(): return map(int,input().split()) def ii(): return int(input()) def isp(): return input().split() def main(): X = ii() print(360//math.gcd(X,360)) if __name__ == "__main__": main()
import math import sys sys.setrecursionlimit(10**9) def mi(): return map(int,input().split()) def ii(): return int(input()) def isp(): return input().split() def main(): X = ii() print(360//math.gcd(X,360)) if __name__ == "__main__": main()
[]
347,499
347,500
u997648604
python
p02633
X = int(input()) r = X ans = 0 while True: r += X r %= 360 ans += 1 if r == 0: break print(ans)
X = int(input()) r = 0 ans = 0 while True: r += X r %= 360 ans += 1 if r == 0: break print(ans)
[ "assignment.value.change", "identifier.replace.remove", "literal.replace.add" ]
347,512
347,513
u779728630
python
p02633
n=int(input()) for i in range(360): if (i*n+n)%360==0: print(i) break
n=int(input()) for i in range(360): if (i*n+n)%360==0: print(i+1) break
[ "expression.operation.binary.add" ]
347,525
347,526
u425758699
python
p02633
x=int(input()) for i in range(1,361): if (i*x)%360==0: print(i)
x=int(input()) for i in range(1,361): if (i*x)%360==0: print(i) break
[ "control_flow.break.add" ]
347,536
347,537
u163320134
python
p02633
n=int(input()) for i in range(1, n): x=360*i%n if x==0: print(360*i//n) break; else: continue;
n=int(input()) for i in range(1, n+1): x=360*i%n if x==0: print(360*i//n) break; else: continue;
[ "control_flow.loop.range.bounds.upper.change", "expression.operation.binary.add" ]
347,544
347,545
u383450070
python
p02633
X=int(input()) B=0 C=0 for i in range(0,360): B=B+X C=B%360 K=K+1 if C==0: print(K) break
X=int(input()) K=0 B=0 C=0 for i in range(0,360): B=B+X C=B%360 K=K+1 if C==0: print(K) break
[ "assignment.add" ]
347,559
347,560
u497188176
python
p02633
import math x = int(input()) def lcm(a): return (x*360)//math.gcd(x,360) if 360%x==0: print(int(360/x)) else: print(lcm(x))
import math x = int(input()) def lcm(a): return (x*360)//math.gcd(x,360) if 360%x==0: print(int(360/x)) else: print(int(lcm(x)/x))
[ "call.arguments.add", "call.arguments.change" ]
347,562
347,563
u730807152
python
p02633
import math X = int(input()) lcm = round(360 * X / math.gcd(360, X)) print(lcm) K = round(lcm / X) print(K)
import math X = int(input()) lcm = round(360 * X / math.gcd(360, X)) K = round(lcm / X) print(K)
[ "call.remove" ]
347,577
347,578
u638231966
python
p02633
import math x = int(input()) print(360//math.gcd(180 - x, 360))
import math x = int(input()) print(360//math.gcd(x, 360))
[ "expression.operation.binary.remove" ]
347,590
347,591
u021019433
python
p02633
from math import gcd X=int(input()) g=gcd(X,360) print((360*X)//(g**2))
from math import gcd X=int(input()) g=gcd(X,360) print((360)//(g))
[ "expression.operation.binary.remove" ]
347,592
347,593
u488401358
python
p02633
x = int(input()) n = 0 while (x*n)%360!=0: n+=1 print(n)
x = int(input()) n = 1 while (x*n)%360!=0: n+=1 print(n)
[ "literal.number.integer.change", "assignment.value.change" ]
347,594
347,595
u882616665
python
p02633
x=int(input()) t=x if(360%x==0): print(360//x) else: count=0 while(x%360!=0): x+=t count+=1 print(count)
x=int(input()) t=x if(360%x==0): print(360//x) else: count=0 while(x%360!=0): x+=t count+=1 print(count+1)
[ "expression.operation.binary.add" ]
347,596
347,597
u636514661
python
p02633
X = int(input()) for k in range(1, 361): if ((180 - X) * k) % 360 == 0: print(k) break
X = int(input()) for k in range(1, 361): if (X * k) % 360 == 0: print(k) break
[ "control_flow.loop.for.condition.change", "control_flow.branch.if.condition.change" ]
347,613
347,614
u019685451
python
p02633
x=int(input()) i=1 while (x*i)%180!=0: i=i+1 print(i)
x=int(input()) i=1 while (x*i)%360!=0: i=i+1 print(i)
[ "literal.number.integer.change", "control_flow.loop.condition.change" ]
347,617
347,618
u139441419
python
p02633
import math X = int(input()) deg = 360 if deg%X==0: ans = deg//X else: ans = (deg*X)//math.gcd(deg,X) print(ans)
import math X = int(input()) deg = 360 if deg%X==0: ans = deg//X else: ans = ((deg*X)//math.gcd(deg,X))//X print(ans)
[ "assignment.change" ]
347,638
347,639
u193657135
python
p02633
X = int(input()) K = 1 dire = X while True: if (dire % 180) == 0: break K+=1 dire+=X print(K)
X = int(input()) K = 1 dire = X while True: if (dire % 360) == 0: break K+=1 dire+=X print(K)
[ "literal.number.integer.change", "control_flow.branch.if.condition.change" ]
347,640
347,641
u923172145
python
p02633
def gcd(a,b): a,b = max(a,b),min(a,b) while b: a,b =b,a%b return a X=int(input()) if 360%X==0: print(360//X) else: g =gcd(360,X) print(360*X//g)
def gcd(a,b): a,b = max(a,b),min(a,b) while b: a,b =b,a%b return a X=int(input()) if 360%X==0: print(360//X) else: g =gcd(360,X) print(360//g)
[ "expression.operation.binary.remove" ]
347,651
347,652
u375616706
python
p02633
X = int(input()) def gcd(a, b): while b: a, b = b, a%b return a def lcm(a, b): return a // gcd(a, b) * b L = lcm(180-X, 360) #print('L:', L) ans = L//(180-X) print(ans)
X = int(input()) def gcd(a, b): while b: a, b = b, a%b return a def lcm(a, b): return a // gcd(a, b) * b L = lcm(X, 360) #print('L:', L) ans = L//X print(ans)
[ "expression.operation.binary.remove" ]
347,653
347,654
u297574184
python
p02633
def gcd(x, y): b = max(x, y) s = min(x, y) r = b % s while r != 0: b = s s = r r = b % s return s def lcm(x, y): return (x * y) // gcd(x,y) X = int(input()) t = lcm(180, X) k = t // X print(k * 2)
def gcd(x, y): b = max(x, y) s = min(x, y) r = b % s while r != 0: b = s s = r r = b % s return s def lcm(x, y): return (x * y) // gcd(x,y) X = int(input()) t = lcm(360, X) k = t // X print(k)
[ "literal.number.integer.change", "assignment.value.change", "call.arguments.change", "expression.operation.binary.remove" ]
347,659
347,660
u456353530
python
p02633
def resolve(): X = int(input()) k = 0 while 1: k += 1 cal = X * k if cal // 360: break print(k) if __name__ == "__main__": resolve()
def resolve(): X = int(input()) k = 0 while 1: k += 1 cal = X * k if cal % 360 == 0: break print(k) if __name__ == "__main__": resolve()
[ "expression.operator.arithmetic.change", "control_flow.branch.if.condition.change" ]
347,665
347,666
u216015528
python
p02633
X = int(input()) ls = [2, 2, 2, 3, 3, 5] a = [] for l in ls: if X % l == 0: a.append(l) X /= l num = 1 if len(a) != 0: for b in a: num *= b print(360 / b)
X = int(input()) ls = [2, 2, 2, 3, 3, 5] a = [] for l in ls: if X % l == 0: a.append(l) X /= l num = 1 if len(a) != 0: for b in a: num *= b print(int(360 / num))
[ "call.arguments.add", "identifier.change", "call.arguments.change", "expression.operation.binary.change", "io.output.change" ]
347,671
347,672
u750228275
python
p02633
def main(): X = int(input()) for i in range(10**5): t += X if t % 360 == 0: return i + 1 print(main())
def main(): X = int(input()) t = 0 for i in range(10**5): t += X if t % 360 == 0: return i + 1 print(main())
[ "assignment.add" ]
347,679
347,680
u858742833
python
p02633
import turtle def main(): x = int(input()) if False: print((360 // x) if 360%x == 0 else (360 // x)+1) else: k = 1 temp = x while temp % 360 != 0: k += 1 temp += x print(k) temp = 360 // x if __name__ == '__main__': main()
def main(): x = int(input()) if False: print((360 // x) if 360%x == 0 else (360 // x)+1) else: k = 1 temp = x while temp % 360 != 0: k += 1 temp += x print(k) temp = 360 // x if __name__ == '__main__': main()
[]
347,719
347,720
u695079172
python
p02633
import math x=int(input()) ct=0 for i in range(1000): ct+=(180-x) if ct%360==0: print(i+1) exit()
import math x=int(input()) ct=0 for i in range(1000): ct+=x if ct%360==0: print(i+1) exit()
[]
347,738
347,739
u017810624
python
p02633
import sys x = int(input()) y = 0 m = 1 if 360 % x == 0: m = int(360 / x) else: for i in range(1, 360): y = x * i if y > 360: if y % 360 == 0: m = i break print(m)
import sys x = int(input()) y = 0 m = 1 if 360 % x == 0: m = int(360 / x) else: for i in range(1, 1000): y = x * i if y > 360: if y % 360 == 0: m = i break print(m)
[ "literal.number.integer.change", "call.arguments.change", "control_flow.loop.range.bounds.upper.change" ]
347,740
347,741
u039860745
python
p02633
import sys x = int(input()) y = 0 m = 0 if 360 % x == 0: m = int(360 / x) else: for i in range(1, x + 1): y = x * i if y > 360: if y % 360 == 0: m = i break print(m)
import sys x = int(input()) y = 0 m = 1 if 360 % x == 0: m = int(360 / x) else: for i in range(1, 1000): y = x * i if y > 360: if y % 360 == 0: m = i break print(m)
[ "literal.number.integer.change", "assignment.value.change", "identifier.replace.remove", "literal.replace.add", "call.arguments.change", "expression.operation.binary.change", "control_flow.loop.range.bounds.upper.change", "expression.operation.binary.remove" ]
347,742
347,741
u039860745
python
p02633
# -*- coding: utf-8 -*- # get a integer a = int(input()) m = a c = 1 while m % 360 != 0: m+=a c+=1 print(m)
# -*- coding: utf-8 -*- # get a integer a = int(input()) m = a c = 1 while m % 360 != 0: m+=a c+=1 print(c)
[ "identifier.change", "call.arguments.change", "io.output.change" ]
347,747
347,748
u254961675
python
p02633
X = int(input()) n = 360 while(1): if n%X == 0: print(int(360/X)) break n = n + 360
X = int(input()) n = 360 while(1): if n % X == 0: print(int(n/X)) break n = n + 360
[ "identifier.replace.add", "literal.replace.remove", "call.arguments.change", "expression.operation.binary.change", "io.output.change" ]
347,776
347,777
u713399713
python
p02633
import math x = int(input()) g = math.gdc(x,360) print(360//g)
import math x = int(input()) g = math.gcd(x,360) print(360//g)
[ "assignment.value.change", "identifier.change" ]
347,785
347,786
u406767170
python
p02633
x =int(input()) for k in range(100000): if x*k%360==0: print(k) exit(0)
x =int(input()) for k in range(1,100000): if x*k%360==0: print(k) exit(0)
[ "call.arguments.add" ]
347,826
347,827
u818349438
python
p02634
# -*- coding: utf-8 -*- ############# # Libraries # ############# import sys input = sys.stdin.readline import math #from math import gcd import bisect import heapq from collections import defaultdict from collections import deque from collections import Counter from functools import lru_cache ############# # Cons...
# -*- coding: utf-8 -*- ############# # Libraries # ############# import sys input = sys.stdin.readline import math #from math import gcd import bisect import heapq from collections import defaultdict from collections import deque from collections import Counter from functools import lru_cache ############# # Cons...
[ "call.arguments.add" ]
347,864
347,865
u493130708
python
p02634
A,B,C,D = map(int,input().split()) MOD=998244353 #dp[i][j]たてにi回、横にj回追加したときの数 DP=[[0]*(D-B+1) for _ in range(C-A+1)] DP[0][0]=1 for i in range(1,C-A+1): DP[i][0]=DP[i-1][0]*B DP[i][0]%=MOD for i in range(1,D-B+1): DP[0][i]=DP[0][i-1]*A DP[0][i]%=MOD for i in range(1,min(C-A,D-B)+1): for j in rang...
A,B,C,D = map(int,input().split()) MOD=998244353 #dp[i][j]たてにi回、横にj回追加したときの数 DP=[[0]*(D-B+1) for _ in range(C-A+1)] DP[0][0]=1 for i in range(1,C-A+1): DP[i][0]=DP[i-1][0]*B DP[i][0]%=MOD for i in range(1,D-B+1): DP[0][i]=DP[0][i-1]*A DP[0][i]%=MOD for i in range(1,min(C-A,D-B)+1): for j in rang...
[ "call.remove" ]
347,990
347,991
u375616706
python
p02634
A,B,C,D = map(int,input().split()) MOD=998244353 #dp[i][j]たてにi回、横にj回追加したときの数 DP=[[0]*(D-B+1) for _ in range(C-A+1)] DP[0][0]=1 for i in range(1,C-A+1): DP[i][0]=DP[i-1][0]*B DP[i][0]%=MOD for i in range(1,D-B+1): DP[0][i]=DP[0][i-1]*A DP[0][i]%=MOD print(DP) for i in range(1,min(C-A,D-B)+1): fo...
A,B,C,D = map(int,input().split()) MOD=998244353 #dp[i][j]たてにi回、横にj回追加したときの数 DP=[[0]*(D-B+1) for _ in range(C-A+1)] DP[0][0]=1 for i in range(1,C-A+1): DP[i][0]=DP[i-1][0]*B DP[i][0]%=MOD for i in range(1,D-B+1): DP[0][i]=DP[0][i-1]*A DP[0][i]%=MOD for i in range(1,min(C-A,D-B)+1): for j in rang...
[ "call.remove" ]
347,992
347,991
u375616706
python
p02634
mod = 998244353 a, b, c, d = map(int, input().split()) dp0 = [0] * (c-a+1) dp1 = [1] for i in range(c-a): dp1.append(dp1[-1] * b % mod) for j in range(1, d-b+1): new_dp0 = [(dp0[0] * a + dp1[0]) % mod] new_dp1 = [dp1[0] * (a-1) % mod] for i in range(1, c-a+1): new_dp0.append((dp0[i] * (a+i) +...
mod = 998244353 a, b, c, d = map(int, input().split()) dp0 = [0] * (c-a+1) dp1 = [1] for i in range(c-a): dp1.append(dp1[-1] * b % mod) for j in range(1, d-b+1): new_dp0 = [(dp0[0] * a + dp1[0]) % mod] new_dp1 = [dp1[0] * (a-1) % mod] for i in range(1, c-a+1): new_dp0.append((dp0[i] * (a+i) + ...
[ "call.arguments.change", "call.arguments.add" ]
348,007
348,008
u070201429
python
p02632
k = int(input()) s = input() mod = 10**9+7 n = len(s) + k frac = [1]*(n+1) finv = [1]*(n+1) for i in range(n): frac[i+1] = (i+1)*frac[i]%mod finv[-1] = pow(frac[-1],mod-2,mod) for i in range(1,n+1): finv[n-i] = finv[n-i+1]*(n-i+1)%mod print(finv,frac) def nCr(n,r,m): if n<0 or r<0 or n<r: return 0 r =...
k = int(input()) s = input() mod = 10**9+7 n = len(s) + k frac = [1]*(n+1) finv = [1]*(n+1) for i in range(n): frac[i+1] = (i+1)*frac[i]%mod finv[-1] = pow(frac[-1],mod-2,mod) for i in range(1,n+1): finv[n-i] = finv[n-i+1]*(n-i+1)%mod def nCr(n,r,m): if n<0 or r<0 or n<r: return 0 r = min(r,n-r) r...
[ "call.remove" ]
348,144
348,145
u800396927
python
p02632
K = int(input()) S = input() m = 1000000007 result = 0 t = pow(26, K, m) u = pow(26, -1, m) * 25 % m l = len(S) for i in range(K + 1): # result += pow(26, K - i, m) * mcomb(len(S) - 1 + i, i) * pow(25, i, m) result += (result + t) % m t = (t * u) % m * (l + i) %m * pow(i + 1, -1, m) % m print(result)
K = int(input()) S = input() m = 1000000007 result = 0 t = pow(26, K, m) u = pow(26, m - 2, m) * 25 % m l = len(S) for i in range(K + 1): # result += pow(26, K - i, m) * mcomb(len(S) - 1 + i, i) * pow(25, i, m) result = (result + t) % m t = (t * u) % m * (l + i) % m * pow(i + 1, m - 2, m) % m print(result...
[ "call.arguments.change", "literal.number.integer.change", "assignment.value.change", "expression.operation.binary.change" ]
348,250
348,249
u347640436
python
p02632
K = int(input()) S = input() m = 1000000007 result = 0 t = pow(26, K, m) u = pow(26, -1, m) * 25 % m l = len(S) for i in range(K + 1): # result += pow(26, K - i, m) * mcomb(len(S) - 1 + i, i) * pow(25, i, m) result += (result + t) % m t = (t * u) % m * (l + i) %m * pow(i + 1, -1, m) % m print(result)
K = int(input()) S = input() m = 1000000007 result = 0 t = pow(26, K, m) u = pow(26, -1, m) * 25 % m l = len(S) for i in range(K + 1): # result += pow(26, K - i, m) * mcomb(len(S) - 1 + i, i) * pow(25, i, m) result = (result + t) % m t = (t * u) % m * (l + i) * pow(i + 1, -1, m) % m print(result)
[ "assignment.value.change", "expression.operation.binary.remove" ]
348,250
348,252
u347640436
python
p02632
import sys read = sys.stdin.buffer.read readline = sys.stdin.buffer.readline readlines = sys.stdin.buffer.readline mod = 10 ** 9 +7 K = int(readline()) S = readline().decode() s = len(S)-1 ### nCrの前処理 n = s+K fact = [1] * (n+1) fact_inv = [1] * (n+1) for i in range(1,n+1): fact[i] = fact[i-1] * i % mod fact...
import sys read = sys.stdin.buffer.read readline = sys.stdin.buffer.readline readlines = sys.stdin.buffer.readlines mod = 10 ** 9 +7 K = int(readline()) S = readline().decode().rstrip() s = len(S)-1 n = s+K fact = [1] * (n+1) fact_inv = [1] * (n+1) for i in range(1,n+1): fact[i] = fact[i-1] * i % mod fact_i...
[ "assignment.value.change", "identifier.change", "call.add" ]
348,301
348,302
u515740713
python
p02632
import sys,bisect,string,math,time,functools,random,fractions from heapq import heappush,heappop,heapify from collections import deque,defaultdict,Counter from itertools import permutations,combinations,groupby rep=range def Golf():n,*t=map(int,open(0).read().split()) def I():return int(input()) def S_():return input()...
import sys,bisect,string,math,time,functools,random,fractions from heapq import heappush,heappop,heapify from collections import deque,defaultdict,Counter from itertools import permutations,combinations,groupby rep=range def Golf():n,*t=map(int,open(0).read().split()) def I():return int(input()) def S_():return input()...
[ "literal.number.integer.change", "assignment.value.change", "call.arguments.change", "expression.operation.binary.change" ]
348,305
348,306
u623819879
python
p02632
mod = 10**9 + 7 K = int(input()) S = input() n = len(S) tmp = pow(26, K, mod) waru = pow(26, -1, mod) ans = tmp for i in range(1, K+1): tmp = (tmp * 25 // waru)%mod tmp = (tmp * (i + n -1) // pow(i, -1, mod))%mod ans = (ans+tmp)%mod print(ans%mod)
mod = 10**9 + 7 K = int(input()) S = input() n = len(S) tmp = pow(26, K, mod) waru = pow(26, -1, mod) ans = tmp for i in range(1, K+1): tmp = (tmp * 25 * waru)%mod tmp = (tmp * (i + n -1) * pow(i, -1, mod))%mod ans = (ans+tmp)%mod print(ans%mod)
[ "expression.operator.arithmetic.change", "assignment.value.change", "expression.operation.binary.change" ]
348,346
348,347
u260036763
python
p02635
s,k = input().split() K = int(k) if s[-1] == "1": s += "0" n = len(s) ls = [] cnt = 0 for i in range(n): if s[i] == "0": ls.append(cnt) cnt = 0 else: cnt += 1 l = len(ls) sm = sum(ls) mod = 998244353 dp = [[[0 for i in range(sm+1)] for j in range(sm+1)] for k in range(l+1)] dp[0][0][0] = 1 smprv = 0 f...
s,k = input().split() K = int(k) if s[-1] == "1": s += "0" n = len(s) ls = [] cnt = 0 for i in range(n): if s[i] == "0": ls.append(cnt) cnt = 0 else: cnt += 1 l = len(ls) sm = sum(ls) mod = 998244353 dp = [[[0 for i in range(sm+1)] for j in range(sm+1)] for k in range(l+1)] dp[0][0][0] = 1 smprv = 0 f...
[ "assignment.add", "assignment.remove" ]
348,426
348,427
u905582793
python
p02639
a,b,c,d,e = (int(x) for i in input().split()) if a == 0: print(1) if b == 0: print(2) if c == 0: print(3) if d == 0: print(4) if e == 0: print(5)
a,b,c,d,e = (int(i) for i in input().split()) if a == 0: print(1) if b == 0: print(2) if c == 0: print(3) if d == 0: print(4) if e == 0: print(5)
[ "assignment.value.change", "identifier.change", "call.arguments.change" ]
348,483
348,484
u617322197
python
p02639
x = list(map(int,input().split())) for i in range(4): if x[i] == 0: print(i + 1)
x = list(map(int,input().split())) for i in range(5): if x[i] == 0: print(i + 1)
[ "literal.number.integer.change", "call.arguments.change", "control_flow.loop.range.bounds.upper.change" ]
348,491
348,492
u768199898
python
p02639
num = int(input().split()) for i in range(6): if num[i] == 0: print(int(str(i)))
num = list(input().split()) for i in range(5): if num[i] == "0": print(int(str(i + 1)))
[ "assignment.value.change", "identifier.change", "call.function.change", "literal.number.integer.change", "call.arguments.change", "control_flow.loop.range.bounds.upper.change", "control_flow.branch.if.condition.change" ]
348,500
348,499
u441902623
python
p02639
x = list(map(int, input().split())) for i in range(len(x)-1): if x[i] == 0: print(i+1)
x = list(map(int, input().split())) for i in range(len(x)): if x[i] == 0: print(i+1)
[ "expression.operation.binary.remove" ]
348,515
348,514
u736154449
python
p02639
x = list(map(int, input().split())) for i,j in enumerate(x): if j == 0: print(i) break
x = list(map(int, input().split())) for i,j in enumerate(x): if j == 0: print(i + 1) break
[ "expression.operation.binary.add" ]
348,520
348,521
u536642030
python
p02639
num_list = input().split() i = 0 while True: if num_list[i] == 0: print(i + 1) break i += 1
num_list = input().split() i = 0 while True: if int(num_list[i]) == 0: print(i + 1) break i += 1
[ "control_flow.branch.if.condition.change", "call.add" ]
348,522
348,523
u645937929
python
p02639
num_list = input().split() i = 0 while True: if num_list[i] != i + 1: print(i + 1) break i += 1
num_list = input().split() i = 0 while True: if int(num_list[i]) == 0: print(i + 1) break i += 1
[ "control_flow.branch.if.condition.change", "call.add" ]
348,524
348,523
u645937929
python
p02639
a = map(int,input().split()) for i in range(len(a)): if a[i] == 0: print(i+1) break
a = list(map(int,input().split())) for i in range(len(a)): if a[i] == 0: print(i+1)
[ "call.add", "call.arguments.change", "control_flow.break.remove" ]
348,531
348,532
u656803083
python
p02639
x = list(map(int, input().split())) n = len(x) for _ in range(n): if x[i] == 0: print(i + 1)
x = list(map(int, input().split())) n = len(x) for i in range(n): if x[i] == 0: print(i + 1)
[ "identifier.change" ]
348,537
348,538
u244466744
python
p02639
X = list(map(int,input().split())) print(A.index(0)+1)
A = list(map(int,input().split())) print(A.index(0)+1)
[ "assignment.variable.change", "identifier.change" ]
348,541
348,542
u926266624
python
p02639
x = list(map(int,input())) for i in range(5): if x[i]==0: print(i+1)
x = list(map(int,input().split())) for i in range(5): if x[i] == 0: print(i+1)
[ "call.add" ]
348,545
348,546
u208633734
python
p02639
X = list(map(int,input().split())) for i in len(5): if X[i]==0: print(i+1)
x = list(map(int,input().split())) for i in range(5): if x[i] == 0: print(i+1)
[ "assignment.variable.change", "identifier.change", "call.function.change", "control_flow.branch.if.condition.change" ]
348,548
348,546
u208633734
python
p02639
X = list(map(int,input().split())) for i in len(5): if X[i]==0: print(i+1)
X = list(map(int,input().split())) for i in range(5): if X[i]==0: print(i+1)
[ "identifier.change", "call.function.change" ]
348,548
348,549
u208633734
python
p02639
X = list(map(int,input())) for i in len(5): if X[i]==0: print(i+1)
X = list(map(int,input().split())) for i in range(5): if X[i]==0: print(i+1)
[ "call.add", "identifier.change", "call.function.change" ]
348,550
348,549
u208633734
python
p02639
x1,x2,x3,x4,x5=map(int, input().split()) if x1==0: print('1') elif x2==0: print('2') elif x3==0: print('3') elif x4==0: print('4') else: print('0')
x1,x2,x3,x4,x5=map(int, input().split()) if x1==0: print('1') elif x2==0: print('2') elif x3==0: print('3') elif x4==0: print('4') else: print('5')
[ "literal.string.change", "call.arguments.change", "io.output.change" ]
348,551
348,552
u951502681
python
p02639
if __name__ == "__main__": x1, x2 , x3, x4, x5 = map(int, input().split()) X = [x1, x2 , x3, x4, x5] for i in range(4): if X[i] == 0: print(i+1)
if __name__ == "__main__": x1, x2 , x3, x4, x5 = map(int, input().split()) X = [x1, x2 , x3, x4, x5] for i in range(5): if X[i] == 0: print(i+1)
[ "literal.number.integer.change", "call.arguments.change", "control_flow.loop.range.bounds.upper.change" ]
348,561
348,562
u250366438
python
p02639
a,b,c,d,e = map(int,input().split()) x = [a,b,c,d,e] for i in range(4): if x[i] == 0: print(i+1)
a,b,c,d,e = map(int,input().split()) x = [a,b,c,d,e] for i in range(len(x)): if x[i] == 0: print(i+1)
[ "identifier.replace.add", "literal.replace.remove", "call.arguments.change", "control_flow.loop.range.bounds.upper.change", "call.arguments.add" ]
348,567
348,568
u471320955
python
p02639
a,b,c,d,e = map(int,input().split()) x = [a,b,c,d,e] for i in range(4): if x[i] == 0: print(i+1)
a,b,c,d,e = map(int,input().split()) x = [a,b,c,d,e] for i in range(5): if x[i] == 0: print(i+1)
[ "literal.number.integer.change", "call.arguments.change", "control_flow.loop.range.bounds.upper.change" ]
348,567
348,569
u471320955
python