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
p02793
N=int(input()) A=[int(i) for i in input().split(" ")] mod=10**9+7 def GCD(a,b): if min(a,b)==0: return max(a,b) else: return GCD(min(a,b),max(a,b)%min(a,b)) def LCM(a,b): return (a*b/GCD(a,b)) lcm=1 for a in A: lcm=LCM(lcm,a) retval=0 for a in A: retval+=lcm/a print(int(retval%...
N=int(input()) A=[int(i) for i in input().split(" ")] mod=10**9+7 def GCD(a,b): if min(a,b)==0: return max(a,b) else: return GCD(min(a,b),max(a,b)%min(a,b)) def LCM(a,b): return int(a*b//GCD(a,b)) lcm=1 for a in A: lcm=LCM(lcm,a) retval=0 for a in A: retval+=lcm//a print(in...
[ "call.add", "type_conversion.to_integer.change", "type_conversion.to_number.change", "function.return_value.change", "expression.operator.arithmetic.change", "expression.operation.binary.change" ]
599,481
599,482
u922952729
python
p02793
import fraction from functools import reduce def lcm_base(x, y): return (x * y) // fraction.gcd(x, y) def lcm_list(numbers): return reduce(lcm_base, numbers, 1) N = int(input()) A = list(map(int,input().split())) mod = 10**9+7 LCM = lcm_list(A) ans = 0 for i in range(N): ans+=LCM//A[i] print(ans%mod)
import math from functools import reduce def lcm_base(x, y): return (x * y) // math.gcd(x, y) def lcm_list(numbers): return reduce(lcm_base, numbers, 1) N = int(input()) A = list(map(int,input().split())) mod = 10**9+7 LCM = lcm_list(A) ans = 0 for i in range(N): ans+=LCM//A[i] print(ans%mod)
[ "identifier.change", "function.return_value.change", "expression.operation.binary.change" ]
599,502
599,503
u189479417
python
p02793
#import math #from functools import reduce from math import gcd #from functools import lru_cache #def lcm_base(x, y): # return (x * y) // gcd(x, y) #def lcm(numbers): # return reduce(lcm_base, numbers, 1) #@lru_cache(maxsize=1000) def lcm(a): x = a[0] for i in range(1, len(a)): x = (x * a[i]) /...
#import math #from functools import reduce from math import gcd #from functools import lru_cache #def lcm_base(x, y): # return (x * y) // gcd(x, y) #def lcm(numbers): # return reduce(lcm_base, numbers, 1) def lcm(a): x = a[0] for i in range(1, len(a)): x = (x * a[i]) // gcd(x, a[i]) retur...
[ "expression.operator.arithmetic.change", "expression.operation.binary.change", "call.arguments.change" ]
599,523
599,524
u917363866
python
p02793
import math N=int(input()) A=list(map(int,input().split())) c=1 a=0 w=10**9+7 for A_ in A: c=c*A_//math.gcd(c,A_) for A_ in A: a+=c/A_ print(int(a%w))
import math N=int(input()) A=list(map(int,input().split())) c=1 a=0 w=10**9+7 for A_ in A: c=c*A_//math.gcd(c,A_) for A_ in A: a+=c//A_ print(int(a%w))
[ "expression.operator.arithmetic.change", "expression.operation.binary.change" ]
599,537
599,538
u391066416
python
p02793
import sys from math import gcd from functools import reduce sys.setrecursionlimit(2147483647) def lcm_base(x, y): return (x * y) // gcd(x, y) def lcm_list(numbers): return reduce(lcm_base, numbers, 1) def main(): N = int(input()) A = list(map(int, input().split())) lcm = lcm_list(A) S = 0 ...
import sys from math import gcd from functools import reduce sys.setrecursionlimit(2147483647) def lcm_base(x, y): return (x * y) // gcd(x, y) def lcm_list(numbers): return reduce(lcm_base, numbers, 1) def main(): N = int(input()) A = list(map(int, input().split())) lcm = lcm_list(A) S = 0 ...
[ "call.add", "call.arguments.change" ]
599,545
599,546
u582333355
python
p02793
n=int(input()) list1=list(map(int,input().split())) import math ans=list1[0] for i in range(1, n): ans = ans * list1[i] // math.gcd(ans, list1[i]) sum1=0 for i in list1: sum1+=ans//i print(sum1//(10**9+7))
n=int(input()) list1=list(map(int,input().split())) import math ans=list1[0] for i in range(1, n): ans = ans * list1[i] // math.gcd(ans, list1[i]) sum1=0 for i in list1: sum1+=ans//i print(sum1%(10**9+7))
[ "expression.operator.arithmetic.change", "call.arguments.change", "expression.operation.binary.change", "io.output.change" ]
599,547
599,548
u755801379
python
p02793
import sys #追加 sys.setrecursionlimit(500*500) def lcm(a): from math import gcd x = a[0] for i in range(1, len(a)): x = (x * a[i]) // gcd(x, a[i]) return int(x) N = int(input()) A = list(map(int, input().split())) LCM = lcm(A) ans = 0 for a in A: ans += int(LCM/a) ans %= 1000000007 p...
import sys #追加 sys.setrecursionlimit(500*500) def lcm(a): from math import gcd x = a[0] for i in range(1, len(a)): x = (x * a[i]) // gcd(x, a[i]) return int(x) N = int(input()) A = list(map(int, input().split())) LCM = lcm(A) ans = 0 for a in A: ans += LCM//a ans %= 1000000007 print(an...
[ "call.remove", "expression.operator.arithmetic.change", "call.arguments.change", "expression.operation.binary.change" ]
599,549
599,550
u843070415
python
p02793
import sys sys.setrecursionlimit(500*500) def lcm(a): from math import gcd x = a[0] for i in range(1, len(a)): x = (x * a[i]) // gcd(x, a[i]) return x N = int(input()) A = list(map(int, input().split())) LCM = lcm(A) ans = 0 for a in A: ans += LCM/a ans %= 1000000007 print(ans)
import sys #追加 sys.setrecursionlimit(500*500) def lcm(a): from math import gcd x = a[0] for i in range(1, len(a)): x = (x * a[i]) // gcd(x, a[i]) return int(x) N = int(input()) A = list(map(int, input().split())) LCM = lcm(A) ans = 0 for a in A: ans += LCM//a ans %= 1000000007 print(an...
[ "call.add", "call.arguments.change", "function.return_value.change", "expression.operator.arithmetic.change", "expression.operation.binary.change" ]
599,551
599,550
u843070415
python
p02793
from sys import stdin from collections import defaultdict N = int(stdin.readline().rstrip()) A = [int(x) for x in stdin.readline().rstrip().split()] mod = 10 ** 9 + 7 g = defaultdict(int) for i in range(N): tmp = 1 a = A[i] while tmp <= A[i] ** 0.5: cnt = 0 while tmp > 1 and a % tmp == 0:...
from sys import stdin from collections import defaultdict N = int(stdin.readline().rstrip()) A = [int(x) for x in stdin.readline().rstrip().split()] mod = 10 ** 9 + 7 g = defaultdict(int) for i in range(N): tmp = 1 a = A[i] while tmp <= A[i] ** 0.5: cnt = 0 while tmp > 1 and a % tmp == 0:...
[ "call.remove" ]
599,611
599,612
u390618988
python
p02793
from math import gcd def lcm(a): from math import gcd x = a[0] for i in range(1, len(a)): x = (x * a[i]) // gcd(x, a[i]) return x n=int(input()) a=list(map(int, input().split())) A=lcm(a) ans=0 for i in a: ans+=A/i print(ans%(10**9+7))
from math import gcd def lcm(a): x = a[0] for i in range(1, len(a)): x = (x * a[i]) // gcd(x, a[i]) return x n=int(input()) a=list(map(int, input().split())) A=lcm(a) ans=0 for i in a: ans+=A//i print(ans%(10**9+7))
[ "expression.operator.arithmetic.change", "expression.operation.binary.change" ]
599,613
599,614
u189326411
python
p02793
from math import gcd def lcm(a): x = a[0] for i in range(1, len(a)): x = (x * a[i]) // gcd(x, a[i]) return x n=int(input()) a=list(map(int, input().split())) A=lcm(a) ans=0 for i in a: ans+=A/i print(int(ans)%(10**9+7))
from math import gcd def lcm(a): x = a[0] for i in range(1, len(a)): x = (x * a[i]) // gcd(x, a[i]) return x n=int(input()) a=list(map(int, input().split())) A=lcm(a) ans=0 for i in a: ans+=A//i print(ans%(10**9+7))
[ "expression.operator.arithmetic.change", "expression.operation.binary.change", "call.remove", "call.arguments.change" ]
599,615
599,614
u189326411
python
p02793
from math import gcd n=int(input()) a=list(map(int, input().split())) mod=10**9+7 l=1 ans=0 for i in a: l=l*i//gcd(l,i) for i in a: ans+=l/i print(int(ans%mod))
from math import gcd n=int(input()) a=list(map(int, input().split())) mod=10**9+7 l=1 ans=0 for i in a: l=l*i//gcd(l,i) for i in a: ans+=l//i print(ans%mod)
[ "expression.operator.arithmetic.change", "expression.operation.binary.change", "call.arguments.change" ]
599,616
599,617
u189326411
python
p02793
import math def lcm(a, b): return a * b / math.gcd(a, b) N = int(input()) A = [int(i) for i in input().split()] mod = 10**9+7 ll = A[0] for i in A: ll = lcm(ll, i) ans = 0 for i in A: ans += ll // i print(int(ans%mod))
import math def lcm(a, b): return a * b // math.gcd(a, b) N = int(input()) A = [int(i) for i in input().split()] mod = 10**9+7 ll = A[0] for i in A: ll = lcm(ll, i) ans = 0 for i in A: ans += ll // i print(int(ans%mod))
[ "expression.operator.arithmetic.change", "function.return_value.change", "expression.operation.binary.change" ]
599,618
599,619
u534953209
python
p02793
import math def lcm_list(numbers): ans = numbers[0] for number in numbers[1:]: ans = (((number * ans)) / (math.gcd(number, ans))) return ans MOD = 10**9+7 N = input() i = 0 arrs = list(map(int, input().split())) lcms = lcm_list(arrs) result = 0 for arr in arrs: result += (lcms/arr) result = re...
import math def lcm_list(numbers): ans = numbers[0] for number in numbers[1:]: ans = (((number * ans)) //(math.gcd(number, ans))) return ans MOD = 10 ** 9 + 7 N = input() i = 0 arrs = list(map(int, input().split())) lcms = lcm_list(arrs) result = 0 for arr in arrs: result += (lcms // arr) re...
[ "expression.operator.arithmetic.change", "assignment.value.change", "expression.operation.binary.change" ]
599,623
599,624
u686175224
python
p02793
import math N = int(input()) A = list(map(int, input().split(' '))) lcm = 1 for a in A: lcm *= (a // math.gcd(lcm, a)) % (10**9 + 7) for i in range(len(A)): A[i] = int(lcm / A[i]) print(sum(A) % (10**9 + 7))
import math N = int(input()) A = list(map(int, input().split(' '))) lcm = 1 for a in A: lcm *= (a // math.gcd(lcm, a)) % (10**9 + 7) for i in range(len(A)): A[i] = lcm // A[i] print(sum(A) % (10**9 + 7))
[ "identifier.change", "expression.operation.binary.change", "call.remove", "expression.operator.arithmetic.change", "assignment.value.change", "call.arguments.change" ]
599,629
599,628
u485859160
python
p02793
import math def xgcd(a, b): x0, y0, x1, y1 = 1, 0, 0, 1 while b != 0: q, a, b = a // b, b, a % b x0, x1 = x1, x0 - q * x1 y0, y1 = y1, y0 - q * y1 return a, x0, y0 def modinv(a, m): g, x, y = xgcd(a, m) if g != 1: raise Exception('modular inverse does not exist') ...
import math def xgcd(a, b): x0, y0, x1, y1 = 1, 0, 0, 1 while b != 0: q, a, b = a // b, b, a % b x0, x1 = x1, x0 - q * x1 y0, y1 = y1, y0 - q * y1 return a, x0, y0 def modinv(a, m): g, x, y = xgcd(a, m) if g != 1: raise Exception('modular inverse does not exist') ...
[ "assignment.value.change", "identifier.change", "call.function.change" ]
599,630
599,631
u780962115
python
p02793
def gcd(a, b): while b != 0: a, b = b, a % b return a def lcm(a, b): return a * b // gcd(a, b) n = int(input()) a = list(map(int, input().split())) lcm_a = a[0] for i in range(1, n): lcm_a = lcm(lcm_a, a[i]) ans = 0 for i in a: ans += lcm_a // i print(ans)
def gcd(a, b): while b != 0: a, b = b, a % b return a def lcm(a, b): return a * b // gcd(a, b) n = int(input()) a = list(map(int, input().split())) lcm_a = a[0] for i in range(1, n): lcm_a = lcm(lcm_a, a[i]) ans = 0 for i in a: ans += lcm_a // i print(ans%1000000007)
[ "expression.operation.binary.add" ]
599,636
599,637
u794652722
python
p02793
import math from functools import reduce mod = 10**9 + 7 def lcm_base(x, y): return (x * y) // math.gcd(x, y) % mod def lcm(*numbers): return reduce(lcm_base, numbers, 1) n = int(input()) a = list(map(int, input().split())) a_ = [] for i in range(n): a_.append(pow(a[i], mod - 2, mod)) num_lcm = lcm(*a)...
import math from functools import reduce mod = 10**9 + 7 def lcm_base(x, y): return (x * y) // math.gcd(x, y) def lcm(*numbers): return reduce(lcm_base, numbers, 1) n = int(input()) a = list(map(int, input().split())) a_ = [] for i in range(n): a_.append(pow(a[i], mod - 2, mod)) num_lcm = lcm(*a) % mod...
[ "expression.operation.binary.remove" ]
599,638
599,639
u287132915
python
p02793
import math from functools import reduce def lcm_base(x, y): return (x * y) // math.gcd(x, y) def lcm_list(numbers): return reduce(lcm_base, numbers, 1) n=int(input()) l=list(map(int,input().split())) a=lcm_list(l) ans_l = [] for i in l: ans_l.append(a/i) print(int(sum(ans_l)%(10**9+7)))
import math from functools import reduce def lcm_base(x, y): return (x * y) // math.gcd(x, y) def lcm_list(numbers): return reduce(lcm_base, numbers, 1) n=int(input()) l=list(map(int,input().split())) a=lcm_list(l) ans_l = [] for i in l: ans_l.append(a//i) print(int(sum(ans_l)%(10**9+7)))
[ "expression.operator.arithmetic.change", "call.arguments.change", "expression.operation.binary.change" ]
599,642
599,643
u007018214
python
p02793
import math from functools import reduce def lcm_base(x, y): return (x * y) // math.gcd(x, y) def lcm_list(numbers): return reduce(lcm_base, numbers, 1) n=int(input()) l=list(map(int,input().split())) a=lcm_list(l) ans_l = [] for i in l: ans_l.append(a/i) print(int(sum(ans_l)%(10**9+7)))
import math from functools import reduce def lcm_base(x, y): return (x * y) // math.gcd(x, y) def lcm_list(numbers): return reduce(lcm_base, numbers, 1) n=int(input()) l=list(map(int,input().split())) a=lcm_list(l) ans_l = [] for i in l: ans_l.append(a//i) print(int(sum(ans_l)%(10**9+7)))
[ "identifier.change", "function.return_value.change", "expression.operation.binary.change", "expression.operator.arithmetic.change", "call.arguments.change" ]
599,644
599,643
u007018214
python
p02793
import sys from collections import Counter read = sys.stdin.read def gcd(a, b): while b: a, b = b, a % b return a def sieve_of_eratosthenes(n): sieve = [True] * n for i in range(3, int(n ** 0.5) + 1, 2): if sieve[i]: sieve[i * i::2 * i] = [False] * ((n - i * i - 1) // (2...
import sys from collections import Counter read = sys.stdin.read def gcd(a, b): while b: a, b = b, a % b return a def sieve_of_eratosthenes(n): sieve = [True] * n for i in range(3, int(n ** 0.5) + 1, 2): if sieve[i]: sieve[i * i::2 * i] = [False] * ((n - i * i - 1) // (2...
[ "assignment.change" ]
599,645
599,646
u945181840
python
p02793
P=1000000007 def power(x,p): if(p==0): return 1; if(p%2): return power(x,p-1)*x%P; a=power(x,p//2); return a*a%P; def inv(x): return power(x,P-2); N=int(input());A=list(map(int,input().split())); #N=10000;A=[1000000 for i in range(N)]; L=[0 for i in range(max(A)+1)] for a in A: t=a;i=2; while(i**2...
P=1000000007 def power(x,p): if(p==0): return 1; if(p%2): return power(x,p-1)*x%P; a=power(x,p//2); return a*a%P; def inv(x): return power(x,P-2); N=int(input());A=list(map(int,input().split())); #N=10000;A=[1000000 for i in range(N)]; L=[0 for i in range(max(A)+1)] for a in A: t=a;i=2; while(i**2...
[ "expression.operator.change" ]
599,651
599,652
u236193715
python
p02793
from math import gcd P = 10**9 + 7 n = int(input()) def lcm(p,q): return p*q//gcd(p,q) a = list(map(int, input().split())) x = a[0] for i in range(1,n): x = lcm(x,a[i]) ans = 0 for i in range(n): ans += x//a[i] if i%5==0: ans = ans%P print(ans)
from math import gcd P = 10**9 + 7 n = int(input()) def lcm(p,q): return p*q//gcd(p,q) a = list(map(int, input().split())) x = a[0] for i in range(1,n): x = lcm(x,a[i]) ans = 0 for i in range(n): ans += x//a[i] if i%10==0: ans = ans%P print(ans%P)
[ "literal.number.integer.change", "control_flow.branch.if.condition.change" ]
599,671
599,672
u117348081
python
p02793
def main(): import math n = int(input()) array = list(map(int, input().split())) lcm = array[0] for i in range(1, n): lcm = lcm * array[i] // math.gcd(lcm, array[i]) total = 0 for i,num in enumerate(array): total += lcm / num print(int(total%(10**9+7))) if __name__ == '...
def main(): import math n = int(input()) array = list(map(int, input().split())) lcm = array[0] for i in range(1, n): lcm = lcm * array[i] // math.gcd(lcm, array[i]) total = 0 for i,num in enumerate(array): total += lcm // num print(int(total%(10**9+7))) if __name__ == ...
[ "expression.operator.arithmetic.change", "expression.operation.binary.change" ]
599,690
599,691
u324197506
python
p02793
import collections N = int(input()) A = list(map(int, input().split())) mod = 10**9+7 def sieve(n): is_prime = [True for _ in range(n+1)] is_prime[0] = False is_prime[1] = False for i in range(2, int(n**0.5)+1): if is_prime[i]: for j in range(i*2, n+1, i): is_prime...
import collections N = int(input()) A = list(map(int, input().split())) mod = 10**9+7 def sieve(n): is_prime = [True for _ in range(n+1)] is_prime[0] = False is_prime[1] = False for i in range(2, int(n**0.5)+1): if is_prime[i]: for j in range(i*2, n+1, i): is_prime...
[ "expression.operator.change" ]
599,694
599,695
u648881683
python
p02793
import sys import math sys.setrecursionlimit(100000) def lcm(x,y): return x/math.gcd(x,y)*y n = int(input()) a = list(map(int,input().split())) LCM=a[0] for i in a: LCM = lcm(LCM,i) ans=0 for i in a: ans += LCM/i print(int(ans)%1000000007)
import sys import math sys.setrecursionlimit(100000) def lcm(x,y): return x//math.gcd(x,y)*y n = int(input()) a = list(map(int,input().split())) LCM=a[0] for i in a: LCM = lcm(LCM,i) ans=0 for i in a: ans += LCM//i print(int(ans)%1000000007)
[ "expression.operator.arithmetic.change", "function.return_value.change", "expression.operation.binary.change" ]
599,705
599,706
u679951803
python
p02793
from collections import defaultdict class LCM_mod: """ 最小公倍数の計算を行う オーバーフローが発生しないように素因数分解し, 因数の積を逐次余りに置き換えて最小公倍数を導出する. """ def __init__(self, max_num, p=10**9+7): self.max_num = max_num + 1 self.p = p self.prime = [0 for _ in range(self.max_num)] self.max_map = de...
from collections import defaultdict class LCM_mod: """ 最小公倍数の計算を行う オーバーフローが発生しないように素因数分解し, 因数の積を逐次余りに置き換えて最小公倍数を導出する. """ def __init__(self, max_num, p=10**9+7): self.max_num = max_num + 1 self.p = p self.prime = [0 for _ in range(self.max_num)] self.max_map = de...
[ "call.arguments.change" ]
599,707
599,708
u652057333
python
p02793
def gcd(a,b): while b!=0: a,b=b,a%b return a def lcm(a,b): return a*b//gcd(a,b) N = int(input()) A = list(map(int, input().split())) lcm_A = 1 for i in range(N): lcm_A = lcm(lcm_A, A[i]) ans = 0 for i in range(N): ans += lcm_A // A[i] mod = 10**9+7 print(ans & mod)
def gcd(a,b): while b!=0: a,b=b,a%b return a def lcm(a,b): return a*b//gcd(a,b) N = int(input()) A = list(map(int, input().split())) lcm_A = 1 for i in range(N): lcm_A = lcm(lcm_A, A[i]) ans = 0 for i in range(N): ans += lcm_A // A[i] mod = 10**9+7 print(ans % mod)
[ "call.arguments.change", "expression.operation.binary.change", "io.output.change" ]
599,717
599,718
u572193732
python
p02793
from functools import reduce from math import gcd import numpy as np MOD = 10**9+7 def lcm_base(x, y): return x * (y // gcd(x, y)) def main(): N = int(input()) a = [int(i) for i in input().split()] A = np.array(a) lcm = reduce(lcm_base, A, 1) B = lcm // A print(np.sum(B) % MOD) if _...
from functools import reduce from math import gcd import numpy as np MOD = 10**9+7 def lcm_base(x, y): return x * (y // gcd(x, y)) def main(): N = int(input()) a = [int(i) for i in input().split()] A = np.array(a) lcm = reduce(lcm_base, a, 1) B = lcm // A print(np.sum(B) % MOD) if _...
[ "assignment.value.change", "identifier.change", "call.arguments.change" ]
599,734
599,735
u638456847
python
p02793
from functools import reduce from math import gcd import numpy as np MOD = 10**9+7 def lcm_base(x, y): return (x * y) // gcd(x, y) def main(): N = int(input()) a = [int(i) for i in input().split()] A = np.array(a) lcm = reduce(lcm_base, A, 1) B = lcm // A print(np.sum(B) % MOD) if __...
from functools import reduce from math import gcd import numpy as np MOD = 10**9+7 def lcm_base(x, y): return x * (y // gcd(x, y)) def main(): N = int(input()) a = [int(i) for i in input().split()] A = np.array(a) lcm = reduce(lcm_base, a, 1) B = lcm // A print(np.sum(B) % MOD) if _...
[ "function.return_value.change", "call.arguments.change", "assignment.value.change", "identifier.change" ]
599,736
599,735
u638456847
python
p02793
n = int(input()) arr = list(map(int,input().split())) N = pow(10,9)+7 def gcd(a,b): if a==0:return b return gcd(b%a,a) def lcm(a,b): tmp = (a*b)//gcd(a,b) return tmp hcm = arr[0] for i in range(1,n): hcm = lcm(hcm,arr[i]) res = 0 for num in arr: res += (hcm//num) print(res) ...
n = int(input()) arr = list(map(int,input().split())) N = pow(10,9)+7 def gcd(a,b): if a==0:return b return gcd(b%a,a) def lcm(a,b): tmp = (a*b)//gcd(a,b) return tmp hcm = arr[0] for i in range(1,n): hcm = lcm(hcm,arr[i]) res = 0 for num in arr: res += (hcm//num) print(res%N) ...
[ "expression.operation.binary.add" ]
599,742
599,743
u424241608
python
p02793
import functools MOD = 10**9 + 7 def lcm(a, b): c, d = a, b while d != 0: c, d = d, c % d return a / c * b def inv_mod(x): return pow(x, MOD - 2) def pow(x: int, n: int) -> int: res = 1 while n > 0: if n & 1 == 1: res = res * x % MOD x = x * x % MOD ...
import functools MOD = 10**9 + 7 def lcm(a, b) -> int: c, d = a, b while d != 0: c, d = d, c % d return a // c * b def inv_mod(x): return pow(x, MOD - 2) def pow(x: int, n: int) -> int: res = 1 while n > 0: if n & 1 == 1: res = res * x % MOD x = x * x %...
[ "expression.operator.arithmetic.change", "function.return_value.change", "expression.operation.binary.change" ]
599,746
599,747
u574189773
python
p02793
def gcd(x, y): while y > 0: tmp = x % y x = y y = tmp return x def lcm(x, y): if x == 0 or y == 0: return 0 else: return x / gcd(x, y) * y def main(): mod = int(1e9 + 7) n = int(input()) a = list(map(int, input().split())) l = 1 for i in rang...
def gcd(x, y): while y > 0: tmp = x % y x = y y = tmp return x def lcm(x, y): if x == 0 or y == 0: return 0 else: return x // gcd(x, y) * y def main(): mod = int(1e9 + 7) n = int(input()) a = list(map(int, input().split())) l = 1 for i in ran...
[ "expression.operator.arithmetic.change", "function.return_value.change", "expression.operation.binary.change" ]
599,751
599,752
u095266283
python
p02793
import fractions import functools MOD = int(1e9) + 7 def lcm(a, b): c, d = a, b while d != 0: c, d = d, c % d return a // c * b class Inv: @classmethod def pow(cls, x: int, n: int) -> int: ret = 1 while n > 0: if n % 2 == 1: ret = ret * x % M...
import fractions import functools MOD = int(1e9) + 7 def lcm(a, b): c, d = a, b while d != 0: c, d = d, c % d return a // c * b class Inv: @classmethod def pow(cls, x: int, n: int) -> int: ret = 1 while n > 0: if n % 2 == 1: ret = ret * x % M...
[ "expression.operator.arithmetic.change", "assignment.value.change", "expression.operation.binary.change", "call.add", "call.arguments.change" ]
599,753
599,754
u726872801
python
p02795
n, h, w = [int(input()) for i in range(3)] k = max(h, w) ans = (n+k-1)//k print(ans)
h, w, n= [int(input()) for i in range(3)] k = max(h, w) ans = (n+k-1)//k print(ans)
[]
599,897
599,898
u595952233
python
p02795
a = int(input()) b = int(input()) n = int(input()) t = max(a, b) print(n + t - 1 / t)
a = int(input()) b = int(input()) n = int(input()) t = max(a, b) print((n + t - 1) // t)
[ "call.arguments.change", "expression.operation.binary.change", "io.output.change" ]
599,899
599,900
u468972478
python
p02795
a = int(input()) b = int(input()) n = int(input()) t = max(a, b) print(n + t - 1 // t)
a = int(input()) b = int(input()) n = int(input()) t = max(a, b) print((n + t - 1) // t)
[ "call.arguments.change" ]
599,901
599,900
u468972478
python
p02795
x=int(input()) y=int(input()) z=max(x,y) print(int(input())//z)
x=int(input()) y=int(input()) z=max(x,y) print(-int(input())//z*-1)
[ "expression.operation.unary.add", "call.arguments.change" ]
599,912
599,913
u130900604
python
p02795
h=int(input()) w=int(input()) m=max(h,w) x=int(input()) print(x//m)
h=int(input()) w=int(input()) m=max(h,w) x=int(input()) print((x+m-1)//m)
[ "call.arguments.change" ]
599,914
599,915
u130900604
python
p02795
h = int(input()) w = int(input()) n = int(input()) cnt = 0 ans = 0 max_num = 0 while ans < n: if h < w: ans += w w -= 1 else: ans += h w -= 1 cnt += 1 print(cnt)
h = int(input()) w = int(input()) n = int(input()) cnt = 0 ans = 0 while ans < n: if h < w: ans += w h -= 1 else: ans += h w -= 1 cnt += 1 print(cnt)
[ "identifier.change" ]
599,951
599,950
u143051858
python
p02794
from collections import defaultdict from heapq import heappop, heappush class Graph(object): def __init__(self): self.graph = defaultdict(list) def __len__(self): return len(self.graph) def add_edge(self, From, To, cost=1): self.graph[From].append((To,cost)) def get_nodes(s...
from collections import defaultdict from heapq import heappop, heappush class Graph(object): def __init__(self): self.graph = defaultdict(list) def __len__(self): return len(self.graph) def add_edge(self, From, To, cost=1): self.graph[From].append((To,cost)) def get_nodes(s...
[ "assignment.value.change", "identifier.replace.remove", "literal.replace.add", "call.arguments.change", "control_flow.loop.range.bounds.upper.change", "control_flow.loop.for.condition.change", "expression.operation.binary.remove" ]
600,145
600,144
u170201762
python
p02795
H = int(input()) W = int(input()) N = int(input()) print((N+max(H,W)-1)/max(H,W))
H = int(input()) W = int(input()) N = int(input()) print(int((N+max(H,W)-1)/max(H,W)))
[ "call.arguments.add", "call.arguments.change" ]
600,216
600,217
u796708718
python
p02795
import math h = int(input()) w = int(input()) n = int(input()) h = max(h,w) print(math.ceil(h/n))
import math h = int(input()) w = int(input()) n = int(input()) h = max(h,w) print(math.ceil(n/h))
[ "expression.operation.binary.remove" ]
600,222
600,223
u101442050
python
p02795
h = int(input()) w = int(input()) n = int(input()) k = max(h, w) print((n - k + 1) // k)
h = int(input()) w = int(input()) n = int(input()) k = max(h, w) print((n + k - 1) // k)
[ "expression.operation.binary.remove" ]
600,226
600,227
u917872021
python
p02795
h = int(input()) w = int(input()) n = int(input()) ans = 0 sum = 0 while(sum < n): if h >= w : sum += h ans += 1 w -= 1 else : sum += w asn += 1 h -= 1 print(ans)
h = int(input()) w = int(input()) n = int(input()) ans = 0 sum = 0 while(sum < n): if h >= w : sum += h ans += 1 w -= 1 else : sum += w ans += 1 h -= 1 print(ans)
[ "identifier.change" ]
600,246
600,247
u242293911
python
p02795
import sys H = int(sys.stdin.readline()) W = int(sys.stdin.readline()) N = int(sys.stdin.readline()) print((N - 1) / max(H, W) + 1)
import sys H = int(sys.stdin.readline()) W = int(sys.stdin.readline()) N = int(sys.stdin.readline()) print((N - 1) // max(H, W) + 1)
[ "expression.operator.arithmetic.change", "call.arguments.change", "expression.operation.binary.change", "io.output.change" ]
600,254
600,255
u899782392
python
p02795
import math h = int(input()) w = int(input()) n = int(input()) print(math.floor(n / max(h, w)) + 1)
import math h = int(input()) w = int(input()) n = int(input()) print(math.ceil(n / max(h, w)))
[ "misc.opposites", "identifier.change", "call.arguments.change", "expression.operation.binary.change", "io.output.change", "expression.operation.binary.remove" ]
600,261
600,262
u250100102
python
p02795
H = int(input()) W = int(input()) N = int(input()) if H >= W: if N//H != 0:print(N//H + 1) else: print(N//H) else: if N//W != 0:print(N//W + 1) else: print(N//W)
H = int(input()) W = int(input()) N = int(input()) if H >= W: if N%H != 0:print(N//H + 1) else: print(N//H) else: if N%W != 0:print(N//W + 1) else: print(N//W)
[ "expression.operator.arithmetic.change", "control_flow.branch.if.condition.change" ]
600,270
600,271
u181195295
python
p02795
H = int(input()) W = int(input()) N = int(input()) if H >= W: if N//H != 0:print(N//H + 1) else: print(N//H) else: if N//H != 0:print(N//W + 1) else: print(N//W)
H = int(input()) W = int(input()) N = int(input()) if H >= W: if N%H != 0:print(N//H + 1) else: print(N//H) else: if N%W != 0:print(N//W + 1) else: print(N//W)
[ "expression.operator.arithmetic.change", "control_flow.branch.if.condition.change" ]
600,272
600,271
u181195295
python
p02795
H = int(input()) W = int(input()) N = int(input()) if H >= W: if H%2 != 0:print(N//H + 1) else: print(N//H) else: if W%2 != 0:print(N//W + 1) else: print(N//W)
H = int(input()) W = int(input()) N = int(input()) if H >= W: if N%H != 0:print(N//H + 1) else: print(N//H) else: if N%W != 0:print(N//W + 1) else: print(N//W)
[ "identifier.change", "control_flow.branch.if.condition.change", "identifier.replace.add", "literal.replace.remove" ]
600,273
600,271
u181195295
python
p02795
H = int(input()) W = int(input()) N = int(input()) print((N // max(H, W) + 1) if N % max(H, W) == 0 else (N // max(H, W)))
H = int(input()) W = int(input()) N = int(input()) print((N // max(H, W)) if N % max(H, W) == 0 else (N // max(H, W) + 1))
[ "expression.operation.binary.remove" ]
600,283
600,284
u536600145
python
p02795
H = int(input()) W = int(input()) N = int(input()) cnt = 0 while paint >= N: paint += max(H,W) cnt += 1 print(cnt)
H = int(input()) W = int(input()) N = int(input()) cnt, paint = 0, 0 while paint < N: paint += max(H,W) cnt += 1 print(cnt)
[ "expression.operator.compare.change", "control_flow.loop.condition.change" ]
600,285
600,286
u536600145
python
p02795
h = int(input()) w = int(input()) n = int(input()) if n // max(h,w) == 0: print(n // max(h,w)) else: print(n // max(h,w) + 1)
h = int(input()) w = int(input()) n = int(input()) if n % max(h,w) == 0: print(n // max(h,w)) else: print(n // max(h,w) + 1)
[ "expression.operator.arithmetic.change", "control_flow.branch.if.condition.change" ]
600,291
600,292
u068142202
python
p02795
h = int(input()) w = int(input()) n = int(input()) h = max(h, w) print(n // h)
h = int(input()) w = int(input()) n = int(input()) h = max(h, w) print((n -1) // h + 1)
[ "call.arguments.change" ]
600,298
600,299
u333183691
python
p02795
H=int(input()) W=int(input()) N=int(input()) k=max(H, W) cnt=0 while k*cnt<=N: cnt+=1 print(cnt)
H=int(input()) W=int(input()) N=int(input()) k=max(H, W) cnt=0 while k*cnt<N: cnt+=1 print(cnt)
[ "expression.operator.compare.change", "control_flow.loop.condition.change" ]
600,302
600,303
u337626942
python
p02795
H = int(input()) W = int(input()) N = int(input()) answer = 0 if H >= W: answer = N // H if N % H != 0: answer += 1 else: answer = N // W if N % H != 0: answer += 1 print(answer)
H = int(input()) W = int(input()) N = int(input()) answer = 0 if H >= W: answer = N // H if N % H != 0: answer += 1 else: answer = N // W if N % W != 0: answer += 1 print(answer)
[ "identifier.change", "control_flow.branch.if.condition.change" ]
600,312
600,313
u617718239
python
p02795
h=int(input()) w=int(input()) n=int(input()) ans=0 x=max(h,w) while n>0: ans+=1 n=n-ans*x print(ans)
#1 h=int(input()) w=int(input()) n=int(input()) ans=0 x=max(h,w) while n>0: ans+=1 n=n-x print(ans)
[ "expression.operation.binary.remove" ]
600,339
600,340
u723583932
python
p02795
a = int(input()) b = int(input()) c = int(input()) d = max(a,b) e = c // d f = c % d if d == 0: print(e) elif d != 0: print(int(e) + int(1))
a = int(input()) b = int(input()) c = int(input()) d = max(a,b) e = c // d mod = c % d if mod == 0: print(e) elif mod != 0: print(int(e) + int(1))
[ "assignment.variable.change", "identifier.change", "control_flow.branch.if.condition.change" ]
600,360
600,361
u529500825
python
p02795
import math H = int(input()) W = int(input()) N = int(input()) if(H >= W): print(math.ceil(N // H)) else: print(math.ceil(N // W))
import math H = int(input()) W = int(input()) N = int(input()) if(H >= W): print(math.ceil(N / H)) else: print(math.ceil(N / W))
[ "expression.operator.arithmetic.change", "call.arguments.change", "expression.operation.binary.change", "io.output.change" ]
600,366
600,367
u841924362
python
p02793
#!/usr/bin/python3 # -*- coding:utf-8 -*- def calc_gcd(a, b): if a > b: a, b = b, a while True: a, b = b%a, a if a == 0: return b def calc_lcm(a, b): gcd = calc_gcd(a, b) return int(a * b / gcd) def main(): n = int(input()) As = list(map(int, input().strip().split())) lcm = As[0] to...
#!/usr/bin/python3 # -*- coding:utf-8 -*- def calc_gcd(a, b): if a > b: a, b = b, a while True: a, b = b%a, a if a == 0: return b def calc_lcm(a, b): gcd = calc_gcd(a, b) return int(a * b // gcd) def main(): n = int(input()) As = list(map(int, input().strip().split())) lcm = As[0] t...
[ "expression.operator.arithmetic.change", "call.arguments.change", "function.return_value.change", "expression.operation.binary.change", "call.remove" ]
600,402
600,403
u210440747
python
p02793
def e_flatten_prime_factorization(MOD=10**9 + 7): N = int(input()) A = [int(i) for i in input().split()] def prime_factorization_dict(n): from collections import defaultdict """nを素因数分解したときの素数とその指数の辞書""" if n == 1: return {2: 0} # 1は素数の0乗の積とみなす i, table = 2, defa...
def e_flatten_prime_factorization(MOD=10**9 + 7): N = int(input()) A = [int(i) for i in input().split()] def prime_factorization_dict(n): from collections import defaultdict """nを素因数分解したときの素数とその指数の辞書""" if n == 1: return {2: 0} # 1は素数の0乗の積とみなす i, table = 2, defa...
[ "literal.number.integer.change", "assignment.value.change", "call.arguments.change" ]
600,413
600,414
u952708174
python
p02793
from collections import * import sys input = sys.stdin.readline #n以下の素数列挙(O(n log(n)) def primes(n): ass = [] is_prime = [True] * (n + 1) is_prime[0] = False is_prime[1] = False for i in range(2, int(n**0.5) + 1): if not is_prime[i]: continue for j in range(i * 2, n + 1,...
from collections import * import sys input = sys.stdin.readline #n以下の素数列挙(O(n log(n)) def primes(n): ass = [] is_prime = [True] * (n + 1) is_prime[0] = False is_prime[1] = False for i in range(2, int(n**0.5) + 1): if not is_prime[i]: continue for j in range(i * 2, n + 1,...
[ "literal.number.integer.change", "assignment.value.change", "call.arguments.change", "expression.operation.binary.change", "call.remove" ]
600,422
600,421
u284854859
python
p02793
from math import gcd from functools import reduce lcm=lambda x,y:x//gcd(x,y)*y MOD=10**9+7 n=int(input()) A=list(map(int,input().split())) c=sum(pow(a,MOD-2,MOD) for a in A)//MOD l=reduce(lcm,A)//MOD print(c*l//MOD)
from math import gcd from functools import reduce lcm=lambda x,y:x//gcd(x,y)*y MOD=10**9+7 n=int(input()) A=list(map(int,input().split())) c=sum(pow(a,MOD-2,MOD) for a in A)%MOD l=reduce(lcm,A)%MOD print(c*l%MOD)
[ "expression.operator.arithmetic.change", "assignment.value.change", "expression.operation.binary.change", "call.arguments.change", "io.output.change" ]
600,425
600,426
u440566786
python
p02793
from functools import reduce import math def lcm_base(x, y): return (x * y) // math.gcd(x, y) def lcm(*numbers): return reduce(lcm_base, numbers, 1) n = int(input()) inp_list = list(map(int,(input().split()))) lcm = lcm_list(inp_list) ans = 0 for i in inp_list: ans += lcm // i print(ans % (10**9+...
from functools import reduce import math def lcm_base(x, y): return (x * y) // math.gcd(x, y) def lcm_list(numbers): return reduce(lcm_base, numbers, 1) n = int(input()) inp_list = list(map(int,(input().split()))) lcm = lcm_list(inp_list) ans = 0 for i in inp_list: ans += lcm // i print(ans % (...
[ "identifier.change" ]
600,460
600,461
u186206732
python
p02793
import math from functools import reduce def lcm_base(x, y): return (x * y) // math.gcd(x, y) def lcm_list(numbers): return reduce(lcm_base, numbers, 1) n = int(input()) a = list(map(int,input().split())) c=0 z=lcm_list(a) for i in range(0,n): c+=(z//a[i]) print(z) print(c%((10**9)+7))
import math from functools import reduce def lcm_base(x, y): return (x * y) // math.gcd(x, y) def lcm_list(numbers): return reduce(lcm_base, numbers, 1) n = int(input()) a = list(map(int,input().split())) c=0 z=lcm_list(a) for i in range(0,n): c+=(z//a[i]) #print(z) print(c%((10**9)+7))
[ "call.remove" ]
600,466
600,467
u866374539
python
p02793
from math import gcd N = int(input()) A = list(map(int,input().split())) mod = 10**9 + 7 LCM = 1 for i in A: GCD = gcd(LCM,i) LCM = LCM*i//GCD ans = 0 for i in A: ans += (LCM//i)%mod print(ans)
from math import gcd N = int(input()) A = list(map(int,input().split())) mod = 10**9 + 7 LCM = 1 for i in A: GCD = gcd(LCM,i) LCM = LCM*i//GCD ans = 0 for i in A: ans += LCM//i print(ans%mod)
[ "expression.operation.binary.remove" ]
600,472
600,473
u540761833
python
p02793
from math import gcd from functools import reduce lcm = lambda a, b: b // lcm(a, b) * a mod = 10 ** 9 + 7 N, *A = map(int, open(0).read().split()) L = reduce(lcm, A) % mod print(sum(L * pow(a, mod - 2, mod) % mod for a in A) % mod)
from math import gcd from functools import reduce lcm = lambda a, b: b // gcd(a, b) * a mod = 10 ** 9 + 7 N, *A = map(int, open(0).read().split()) L = reduce(lcm, A) % mod print(sum(L * pow(a, mod - 2, mod) for a in A) % mod)
[ "assignment.value.change", "identifier.change", "call.function.change", "expression.operation.binary.change", "expression.operation.binary.remove" ]
600,479
600,480
u606045429
python
p02793
from math import gcd from functools import reduce lcm = lambda a, b: b // lcm(a, b) * a mod = 10 ** 9 + 7 N, *A = map(int, open(0).read().split()) L = reduce(lcm, A) % mod print(sum(L * pow(a, mod - 2, mod) % mod for a in A) % mod)
from math import gcd from functools import reduce lcm = lambda a, b: b // gcd(a, b) * a mod = 10 ** 9 + 7 N, *A = map(int, open(0).read().split()) L = reduce(lcm, A) % mod print(sum(L * pow(a, mod - 2, mod) % mod for a in A) % mod)
[ "assignment.value.change", "identifier.change", "call.function.change", "expression.operation.binary.change" ]
600,479
600,481
u606045429
python
p02793
# = int(input()) # = map(int, input().split()) # = list(map(int, input().split())) # = list(input()) # = [tuple(map(int, input().split())) for _ in range(n)] n = int(input()) p = list(map(int, input().split())) if n == 1: print(1) exit() MOD = 10 ** 9 + 7 def gcd(a, b): while b: a, b = b, a%b ...
# = int(input()) # = map(int, input().split()) # = list(map(int, input().split())) # = list(input()) # = [tuple(map(int, input().split())) for _ in range(n)] n = int(input()) p = list(map(int, input().split())) if n == 1: print(1) exit() MOD = 10 ** 9 + 7 def gcd(a, b): while b: a, b = b, a%b ...
[ "expression.operation.binary.add" ]
600,482
600,483
u824237520
python
p02793
from math import gcd import random n = int(input()) a = list(map(int, input().split( ))) random.shuffle(a) #最小公倍数でよいか? #全てのjについてAiBiはAjで割り切れる #計算時間は? mod =10**9+7 def lcd(x,y): g = gcd(x,y) return x*y//g ag1 = 1 for i in range(n//2): ag1 = lcd(ag1,a[i]) ag2 = 1 for i in range(n//2,n): ag2 = lcd(ag2,a...
from math import gcd import random n = int(input()) a = list(map(int, input().split( ))) random.shuffle(a) #最小公倍数でよいか? #全てのjについてAiBiはAjで割り切れる #計算時間は? mod =10**9+7 def lcd(x,y): g = gcd(x,y) return x*y//g ag1 = 1 for i in range(n//2): ag1 = lcd(ag1,a[i]) ag2 = 1 for i in range(n//2,n): ag2 = lcd(ag2,a...
[]
600,500
600,501
u520276780
python
p02793
def gcd(x, y): x = x % y if x == 0: return y return gcd(y, x) def lcm(x, y): return x // gcd(x, y) * y n = int(input()) a = list(map(int, input().split(' '))) l = 1 for ai in a: l = lcm(l, ai) print(l) mod = 1000000007 ans = 0 for ai in a: ans += l // ai ans %= mod print(ans)
def gcd(x, y): x = x % y if x == 0: return y return gcd(y, x) def lcm(x, y): return x // gcd(x, y) * y n = int(input()) a = list(map(int, input().split(' '))) l = 1 for ai in a: l = lcm(l, ai) mod = 1000000007 ans = 0 for ai in a: ans += l // ai ans %= mod print(ans)
[ "call.remove" ]
600,504
600,505
u500496457
python
p02793
from functools import reduce import math def lcm_base(x, y): return (x * y) // math.gcd(x, y) def lcm(*numbers): return reduce(lcm_base, numbers, 1) def lcm_list(numbers): return reduce(lcm_base, numbers, 1) N = int(input().rstrip()) As = input().rstrip().split(" ") As = [int(p) for p in As] cand = lcm...
from functools import reduce import math def lcm_base(x, y): return (x * y) // math.gcd(x, y) def lcm(*numbers): return reduce(lcm_base, numbers, 1) def lcm_list(numbers): return reduce(lcm_base, numbers, 1) N = int(input().rstrip()) As = input().rstrip().split(" ") As = [int(p) for p in As] cand ...
[ "expression.operator.arithmetic.change", "assignment.value.change", "expression.operation.binary.change", "call.arguments.change" ]
600,512
600,511
u293838812
python
p02793
from functools import reduce import math def lcm_base(x, y): return (x * y) // math.gcd(x, y) def lcm(*numbers): return reduce(lcm_base, numbers, 1) def lcm_list(numbers): return reduce(lcm_base, numbers, 1) N = int(input().rstrip()) As = input().rstrip().split(" ") As = [int(p) for p in As] cand = lcm...
from functools import reduce import math def lcm_base(x, y): return (x * y) // math.gcd(x, y) def lcm(*numbers): return reduce(lcm_base, numbers, 1) def lcm_list(numbers): return reduce(lcm_base, numbers, 1) N = int(input().rstrip()) As = input().rstrip().split(" ") As = [int(p) for p in As] cand ...
[ "identifier.change", "function.return_value.change", "expression.operation.binary.change", "expression.operator.arithmetic.change", "assignment.value.change", "call.arguments.change" ]
600,513
600,511
u293838812
python
p02793
from functools import reduce import math def lcm_base(x, y): return (x * y) // math.gcd(x, y) def lcm(*numbers): return reduce(lcm_base, numbers, 1) def lcm_list(numbers): return reduce(lcm_base, numbers, 1) N = int(input().rstrip()) As = input().rstrip().split(" ") As = [int(p) for p in As] cand = lcm...
from functools import reduce import math def lcm_base(x, y): return (x * y) // math.gcd(x, y) def lcm(*numbers): return reduce(lcm_base, numbers, 1) def lcm_list(numbers): return reduce(lcm_base, numbers, 1) N = int(input().rstrip()) As = input().rstrip().split(" ") As = [int(p) for p in As] cand ...
[ "expression.operator.arithmetic.change", "assignment.value.change", "expression.operation.binary.change", "call.arguments.change" ]
600,512
600,514
u293838812
python
p02793
from functools import reduce import math def lcm_base(x, y): return (x * y) // math.gcd(x, y) def lcm(*numbers): return reduce(lcm_base, numbers, 1) def lcm_list(numbers): return reduce(lcm_base, numbers, 1) N = int(input().rstrip()) As = input().rstrip().split(" ") As = [int(p) for p in As] cand = lcm...
from functools import reduce import math def lcm_base(x, y): return (x * y) // math.gcd(x, y) def lcm(*numbers): return reduce(lcm_base, numbers, 1) def lcm_list(numbers): return reduce(lcm_base, numbers, 1) N = int(input().rstrip()) As = input().rstrip().split(" ") As = [int(p) for p in As] cand ...
[ "identifier.change", "function.return_value.change", "expression.operation.binary.change", "expression.operator.arithmetic.change", "assignment.value.change", "call.arguments.change" ]
600,513
600,514
u293838812
python
p02793
from math import gcd def lcm(x, y): return (x * y) // gcd(x, y) n = int(input()) a = [int(x) for x in input().split()] sum = 0 G=1 for elem in a: G=lcm(G,elem) for elem in a: sum+=G//elem print(sum)
from math import gcd def lcm(x, y): return (x * y) // gcd(x, y) n = int(input()) a = [int(x) for x in input().split()] sum = 0 G=1 for elem in a: G=lcm(G,elem) for elem in a: sum+=G//elem print(sum%1000000007)
[ "expression.operation.binary.add" ]
600,521
600,522
u169212791
python
p02793
#coding:utf-8 from math import gcd n = int(input()) a = list(map(int, input().split(' '))) mod = 10 ** 9 + 7 #最小公倍数を取得 g = a[0] for num in a[1:]: g = g * num // gcd(num, g) ans = 0 #計算後なのでmodオッケー l = g % mod for num in a: ans += l * pow(num, nod-2, mod) ans %= mod print(ans % mod)
#coding:utf-8 from math import gcd n = int(input()) a = list(map(int, input().split(' '))) mod = 10 ** 9 + 7 #最小公倍数を取得 g = a[0] for num in a[1:]: g = g * num // gcd(num, g) ans = 0 #計算後なのでmodオッケー l = g % mod for num in a: ans += l * pow(num, mod-2, mod) ans %= mod print(ans % mod)
[ "identifier.change", "call.arguments.change", "expression.operation.binary.change" ]
600,528
600,529
u724563664
python
p02793
import math mod = 1e9 + 7; N = int(input()) A = list(map(int, input().split())) l = 1 for i in A: l = l * i // math.gcd(l, i) sum = 0 for i in A: sum += l // i print(int(sum % mod))
import math mod = 10**9 + 7; N = int(input()) A = list(map(int, input().split())) l = 1 for i in A: l = l * i // math.gcd(l, i) sum = 0 for i in A: sum += l // i print(int(sum % mod))
[ "assignment.value.change", "expression.operation.binary.change" ]
600,532
600,531
u788717734
python
p02795
h=int(input()) w=int(input()) n=int(input()) print((n-1)//max(h,w)+2)
h=int(input()) w=int(input()) n=int(input()) print((n-1)//max(h,w)+1)
[ "literal.number.integer.change", "call.arguments.change", "expression.operation.binary.change", "io.output.change" ]
600,541
600,542
u143612492
python
p02795
h=int(input()) w=int(input()) n=int(input()) print(n//max(h,w)+1)
h=int(input()) w=int(input()) n=int(input()) print((n-1)//max(h,w)+1)
[ "call.arguments.change" ]
600,543
600,542
u143612492
python
p02795
def resolve(): import sys import math H, W, N = map(int, sys.stdin.read().split('\n')) m = max(H, W) print(math.ceil(N / m)) resolve()
def resolve(): import sys import math H, W, N = map(int, sys.stdin.read().split()) m = max(H, W) print(math.ceil(N / m)) resolve()
[]
600,544
600,545
u644516473
python
p02795
def resolve(): import sys import math H, W, N = map(int, sys.stdin.read().split('\n')) m = max(H, W) print(math.ceil(N / m)) resolve()
def resolve(): import sys import math H, W, N = map(int, sys.stdin.read().split()) m = max(H, W) print(math.ceil(N / m)) resolve()
[]
600,546
600,545
u644516473
python
p02795
def resolve(): import sys import math H, W, N = map(int, sys.stdin.read().split('\n')) m = max(H, W) print(math.ceil(N / m)) resolve()
def resolve(): import sys import math H, W, N = map(int, sys.stdin.read().split()) m = max(H, W) print(math.ceil(N / m)) resolve()
[]
600,548
600,545
u644516473
python
p02795
def resolve(): import sys import math H, W, N = map(int, sys.stdin.read().split('\n')) m = max(H, W) print(math.ceil(N / m)) resolve()
def resolve(): import sys import math H, W, N = map(int, sys.stdin.read().rstrip().split('\n')) m = max(H, W) print(math.ceil(N / m)) resolve()
[]
600,544
600,550
u644516473
python
p02795
def resolve(): import sys import math H, W, N = map(int, sys.stdin.read().split('\n')) m = max(H, W) print(math.ceil(N / m)) resolve()
def resolve(): import sys import math H, W, N = map(int, sys.stdin.read().rstrip().split('\n')) m = max(H, W) print(math.ceil(N / m)) resolve()
[]
600,546
600,550
u644516473
python
p02795
def resolve(): import sys import math H, W, N = map(int, sys.stdin.read().split('\n')) m = max(H, W) print(math.ceil(N / m)) resolve()
def resolve(): import sys import math H, W, N = map(int, sys.stdin.read().rstrip().split('\n')) m = max(H, W) print(math.ceil(N / m)) resolve()
[]
600,548
600,550
u644516473
python
p02795
H = int(input()) W = int(input()) N = int(input()) M = max(H, W) if N % M: S = N // M else: S = N // M + 1 print(S)
H = int(input()) W = int(input()) N = int(input()) M = max(H, W) if N % M == 0: S = N // M else: S = N // M + 1 print(S)
[ "control_flow.branch.if.condition.change" ]
600,560
600,561
u984276646
python
p02795
h=int(input()) n=int(input()) w=int(input()) v=max(h,n) print(w+v-1//v)
h=int(input()) n=int(input()) w=int(input()) v=max(h,n) print((w+v-1)//v)
[ "call.arguments.change" ]
600,572
600,573
u269724549
python
p02795
h = int(input()) w = int(input()) n = int(input()) ans(-(-n//max(h,w)))
h = int(input()) w = int(input()) n = int(input()) print(-(-n//max(h,w)))
[ "identifier.change", "call.function.change" ]
600,583
600,584
u597455618
python
p02795
h = int(input()) w = int(input()) n = int(input()) if(h>=w): big=h else: big=w print(int(n/big))
h = int(input()) w = int(input()) n = int(input()) import math if(h>=w): big=h else: big=w print(math.ceil(n/big))
[ "call.arguments.change", "io.output.change" ]
600,585
600,586
u142223843
python
p02795
N = int(input()) M = int(input()) K = int(input()) print(-(-K//M))
N = int(input()) M = int(input()) K = int(input()) print(-(-K//max(N,M)))
[ "call.add", "call.arguments.change" ]
600,589
600,590
u941407962
python
p02795
H = int(input()) W = int(input()) N = int(input()) if N % 2 == 0: print(N // max(H,W)) else: print(N // max(H,W) + 1)
H = int(input()) W = int(input()) N = int(input()) if N % max(H,W) == 0: print(N // max(H,W)) else: print(N // max(H,W) + 1)
[ "identifier.replace.add", "literal.replace.remove", "control_flow.branch.if.condition.change", "call.arguments.add" ]
600,591
600,592
u185424824
python
p02795
import math H, W, N = [int(input()) for i in range(3)] if H >= W: long = H else: long = W c = math.ceil(N // long ) print(c)
import math H, W, N = [int(input()) for i in range(3)] if H >= W: long = H else: long = W c = math.ceil(N / long ) print(c)
[ "expression.operator.arithmetic.change", "assignment.value.change", "call.arguments.change", "expression.operation.binary.change" ]
600,600
600,601
u196675341
python
p02795
H = int(input()) W = int(input()) N = int(input()) if H >= W: if N%H == 0: count = N/H else: count = int(N/H) + 1 else: if N%H == 0: count = N/W else: count = int(N/W) + 1 print(int(count))
H = int(input()) W = int(input()) N = int(input()) if H >= W: if N%H == 0: count = N/H else: count = int(N/H) + 1 else: if N%W == 0: count = N/W else: count = int(N/W) + 1 print(int(count))
[ "identifier.change", "control_flow.branch.if.condition.change" ]
600,615
600,616
u786168796
python
p02795
from math import ceil H = int(input()) W = int(input()) N = int(input()) m = max(H, W) print(ceil(N // m))
from math import ceil H = int(input()) W = int(input()) N = int(input()) m = max(H, W) print(ceil(N / m))
[ "expression.operator.arithmetic.change", "call.arguments.change", "expression.operation.binary.change", "io.output.change" ]
600,619
600,620
u347064383
python
p02795
H = int(input()) W = int(input()) N = int(input()) large = max(H,W) ans = int(N / large)+1 print(ans)
H = int(input()) W = int(input()) N = int(input()) large = max(H,W) ans = int((N-1) / large)+1 print(ans)
[ "call.arguments.change" ]
600,625
600,626
u769383879
python
p02795
H=int(input()) W=int(input()) N=int(input()) if H<W: H,W=W,H ans = N // H if N % H > 0: N += 1 print(ans)
H=int(input()) W=int(input()) N=int(input()) if H<W: H,W=W,H ans = N // H if N % H > 0: ans += 1 print(ans)
[ "identifier.change" ]
600,627
600,628
u731368968
python
p02795
import math def main(): h = int(inout()) w = int(input()) n = int(input()) print(math.ceil(n/(max(h,w)))) main()
import math def main(): h = int(input()) w = int(input()) n = int(input()) print(math.ceil(n/(max(h,w)))) main()
[ "assignment.value.change", "identifier.change", "call.function.change", "call.arguments.change" ]
600,643
600,644
u041401317
python
p02795
h = int(input()) w = int(input()) n = int(input()) if h < w: t = n / w else: t = n / h print(int(t))
import math h = int(input()) w = int(input()) n = int(input()) if h < w: t = n / w else: t = n / h print(math.ceil(t))
[ "call.arguments.change", "io.output.change" ]
600,662
600,663
u575101291
python
p02795
H = int(input()) W = int(input()) N = int(input()) a = max(H,W) x = int(N/a) print(x)
import math H = int(input()) W = int(input()) N = int(input()) a = max(H,W) x = math.ceil(N/a) print(x)
[ "assignment.value.change" ]
600,668
600,669
u100277898
python