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 9
values |
|---|---|---|---|---|---|---|---|
p02782
|
m = 1000000007
r1, c1, r2, c2 = map(int, input().split())
nf = 10 ** 6 * 2 + 100
fact = [0] * (nf + 1)
fact[0] = 1
for i in range(nf):
fact[i + 1] = fact[i] * (i + 1) % m
def F(r, c):
path = (fact[r + c + 2] % m) * pow(fact[r + 1] * fact[c + 1], m - 2, m) % m
return path - 1
r1 -= 1
c1 -= 1
ans = F(r2, c2)
ans -= F(r1, c2)
ans -= F(r2, c1)
ans += F(r1, c1)
print(ans)
|
m = 1000000007
r1, c1, r2, c2 = map(int, input().split())
nf = 10 ** 6 * 2 + 100
fact = [0] * (nf + 1)
fact[0] = 1
for i in range(nf):
fact[i + 1] = fact[i] * (i + 1) % m
def F(r, c):
path = (fact[r + c + 2] % m) * pow(fact[r + 1] * fact[c + 1], m - 2, m) % m
return path - 1
r1 -= 1
c1 -= 1
ans = F(r2, c2)
ans -= F(r1, c2)
ans -= F(r2, c1)
ans += F(r1, c1)
ans = ans % m
print(ans)
|
[
"assignment.add"
] | 582,466
| 582,467
|
u325956328
|
python
|
p02782
|
#input
r_1, c_1, r_2, c_2 = map(int, input().split())
#output
mod = 10**9 + 7
n_ = 10**7 + 3
fun = [1]*(n_+1)
for i in range(1,n_+1):
fun[i] = fun[i-1]*i%mod
rev = [1]*(n_+1)
rev[n_] = pow(fun[n_],mod-2,mod)
for i in range(n_-1,0,-1):
rev[i] = rev[i+1]*(i+1)%mod
def cmb(n,r):
if n <= 0 or r < 0 or r > n: return 0
return fun[n]*rev[r]%mod*rev[n-r]%mod
answer = 0
for j in range(c_1, c_2+1):
answer += cmb(r_2+j+1, j+1) % mod - cmb(r_1+j, j+1) % mod
print(answer % mod)
|
#input
r_1, c_1, r_2, c_2 = map(int, input().split())
#output
mod = 10**9 + 7
n_ = 2*10**6 + 1
fun = [1]*(n_+1)
for i in range(1,n_+1):
fun[i] = fun[i-1]*i%mod
rev = [1]*(n_+1)
rev[n_] = pow(fun[n_],mod-2,mod)
for i in range(n_-1,0,-1):
rev[i] = rev[i+1]*(i+1)%mod
def cmb(n,r):
if n <= 0 or r < 0 or r > n: return 0
return fun[n]*rev[r]%mod*rev[n-r]%mod
answer = 0
for j in range(c_1, c_2+1):
answer += cmb(r_2+j+1, j+1) % mod - cmb(r_1+j, j+1) % mod
print(answer % mod)
|
[
"literal.number.integer.change",
"assignment.value.change",
"expression.operation.binary.change"
] | 582,512
| 582,513
|
u461454424
|
python
|
p02782
|
#input
r_1, c_1, r_2, c_2 = map(int, input().split())
#output
mod = 10**9 + 7
n_ = 10**10 + 3
fun = [1]*(n_+1)
for i in range(1,n_+1):
fun[i] = fun[i-1]*i%mod
rev = [1]*(n_+1)
rev[n_] = pow(fun[n_],mod-2,mod)
for i in range(n_-1,0,-1):
rev[i] = rev[i+1]*(i+1)%mod
def cmb(n,r):
if n <= 0 or r < 0 or r > n: return 0
return fun[n]*rev[r]%mod*rev[n-r]%mod
answer = 0
for j in range(c_1, c_2+1):
answer += cmb(r_2+j+1, j+1) % mod - cmb(r_1+j, j+1) % mod
print(answer % mod)
|
#input
r_1, c_1, r_2, c_2 = map(int, input().split())
#output
mod = 10**9 + 7
n_ = 2*10**6 + 1
fun = [1]*(n_+1)
for i in range(1,n_+1):
fun[i] = fun[i-1]*i%mod
rev = [1]*(n_+1)
rev[n_] = pow(fun[n_],mod-2,mod)
for i in range(n_-1,0,-1):
rev[i] = rev[i+1]*(i+1)%mod
def cmb(n,r):
if n <= 0 or r < 0 or r > n: return 0
return fun[n]*rev[r]%mod*rev[n-r]%mod
answer = 0
for j in range(c_1, c_2+1):
answer += cmb(r_2+j+1, j+1) % mod - cmb(r_1+j, j+1) % mod
print(answer % mod)
|
[
"literal.number.integer.change",
"assignment.value.change",
"expression.operation.binary.change"
] | 582,514
| 582,513
|
u461454424
|
python
|
p02782
|
import sys
import numpy as np
sys.setrecursionlimit(10 ** 7)
r1, c1, r2, c2 = map(int, input().split())
# 階乗、Combinationコンビネーション(numpyを使う)
def cumprod(arr, MOD):
L = len(arr)
Lsq = int(L**.5+1)
arr = np.resize(arr, Lsq**2).reshape(Lsq, Lsq)
for n in range(1, Lsq):
arr[:, n] *= arr[:, n-1]
arr[:, n] %= MOD
for n in range(1, Lsq):
arr[n] *= arr[n-1, -1]
arr[n] %= MOD
return arr.ravel()[:L]
def make_fact(U, MOD):
x = np.arange(U, dtype=np.int64)
x[0] = 1
fact = cumprod(x, MOD)
x = np.arange(U, 0, -1, dtype=np.int64)
x[0] = pow(int(fact[-1]), MOD-2, MOD)
fact_inv = cumprod(x, MOD)[::-1]
return fact, fact_inv
MOD = 10 ** 9 + 7
U = 10**6 * 2 + 1
fact, fact_inv = make_fact(U, MOD)
def mod_comb_k(n, k, mod):
return fact[n] * fact_inv[k] % mod * fact_inv[n - k] % mod
def calc_rc(r, c):
a = mod_comb_k(r + c + 2, r + 1, MOD)
b = 1
return a-b
ans = calc_rc(r2, c2) + calc_rc(r1-1, c1-1) - \
calc_rc(r1-1, c2) - calc_rc(r2, c1-1)
print(ans)
|
import sys
import numpy as np
sys.setrecursionlimit(10 ** 7)
r1, c1, r2, c2 = map(int, input().split())
# 階乗、Combinationコンビネーション(numpyを使う)
def cumprod(arr, MOD):
L = len(arr)
Lsq = int(L**.5+1)
arr = np.resize(arr, Lsq**2).reshape(Lsq, Lsq)
for n in range(1, Lsq):
arr[:, n] *= arr[:, n-1]
arr[:, n] %= MOD
for n in range(1, Lsq):
arr[n] *= arr[n-1, -1]
arr[n] %= MOD
return arr.ravel()[:L]
def make_fact(U, MOD):
x = np.arange(U, dtype=np.int64)
x[0] = 1
fact = cumprod(x, MOD)
x = np.arange(U, 0, -1, dtype=np.int64)
x[0] = pow(int(fact[-1]), MOD-2, MOD)
fact_inv = cumprod(x, MOD)[::-1]
return fact, fact_inv
MOD = 10 ** 9 + 7
U = 10**6 * 2 + 10
fact, fact_inv = make_fact(U, MOD)
def mod_comb_k(n, k, mod):
return fact[n] * fact_inv[k] % mod * fact_inv[n - k] % mod
def calc_rc(r, c):
a = mod_comb_k(r + c + 2, r + 1, MOD)
b = 1
return a-b
ans = calc_rc(r2, c2) + calc_rc(r1-1, c1-1) - \
calc_rc(r1-1, c2) - calc_rc(r2, c1-1)
ans %= MOD
print(ans)
|
[
"literal.number.integer.change",
"assignment.value.change",
"expression.operation.binary.change"
] | 582,523
| 582,522
|
u593567568
|
python
|
p02783
|
h,a=map(int,input.split())
cnt=0
while True:
h-=a
cnt+=1
if h<=0:
break
print(cnt)
|
h,a=map(int,input().split())
cnt=0
while True:
h-=a
cnt+=1
if h<=0:
break
print(cnt)
|
[
"call.add"
] | 582,566
| 582,567
|
u243159381
|
python
|
p02783
|
H,A = map(int(),input().split)
print(H//A if H%A == 0 else H//A+1)
|
H,A = map(int,input().split())
print(H//A if H%A == 0 else H//A+1)
|
[
"call.arguments.change",
"call.add"
] | 582,572
| 582,573
|
u288980918
|
python
|
p02783
|
a,b=list(map(int,input().split()))
count=0
while (a<0):
count+=1
a-=b
print(count)
|
a,b=list(map(int,input().split()))
count=0
while (a>0):
count+=1
a-=b
print(count)
|
[
"misc.opposites",
"expression.operator.compare.change",
"control_flow.loop.condition.change"
] | 582,584
| 582,585
|
u754511616
|
python
|
p02783
|
a,b=list(map(int,input()))
count=0
while (a<0):
count+=1
a-=b
print(count)
|
a,b=list(map(int,input().split()))
count=0
while (a>0):
count+=1
a-=b
print(count)
|
[
"call.add",
"misc.opposites",
"expression.operator.compare.change",
"control_flow.loop.condition.change"
] | 582,586
| 582,585
|
u754511616
|
python
|
p02783
|
tmp = input().split(" ")
HP = int(tmp[0])
attack = int(tmp[1])
print(math.ceil(HP/attack))
|
import math
tmp = input().split(" ")
HP = int(tmp[0])
attack = int(tmp[1])
print(math.ceil(HP/attack))
|
[] | 582,587
| 582,588
|
u739843002
|
python
|
p02783
|
H,A = map(int,input().split())
answer = H // A
if answer == 0:
answer += 1
print(answer)
|
H,A = map(int,input().split())
answer = H // A + 1
if H % A == 0:
answer -= 1
print(answer)
|
[
"control_flow.branch.if.condition.change",
"expression.operator.change"
] | 582,595
| 582,596
|
u732061897
|
python
|
p02783
|
import math
#h = int(input())
#a = int(input())
h,a = map(int,input().split())
print(math.ceil((h+a)/a))
|
import math
#h = int(input())
#a = int(input())
h,a = map(int,input().split())
print(math.ceil((h)/a))
|
[
"expression.operation.binary.remove"
] | 582,597
| 582,598
|
u704411633
|
python
|
p02783
|
INPUT = list(input().split())
H = INT(INPUT[0])
A = INT(INPUT[1])
if H%A == 0:
print(H//A)
else:
print(H//A + 1)
|
INPUT = list(input().split())
H = int(INPUT[0])
A = int(INPUT[1])
if H%A == 0:
print(H//A)
else:
print(H//A + 1)
|
[
"assignment.value.change",
"identifier.change",
"call.function.change"
] | 582,599
| 582,600
|
u893418950
|
python
|
p02783
|
H,A=map(int, input().split())
print(math.ceil(H/A))
|
import math
H,A=map(int, input().split())
print(math.ceil(H/A))
|
[] | 582,603
| 582,604
|
u799428010
|
python
|
p02783
|
H, A =map(int,input().split())
T = 0
while H <= 0:
H -= A
T += 1
print(T)
|
H, A =map(int,input().split())
T = 0
while H > 0:
H -= A
T += 1
print(T)
|
[
"expression.operator.compare.change",
"control_flow.loop.condition.change"
] | 582,607
| 582,608
|
u272457181
|
python
|
p02783
|
h,a = map(int,input().split())
counter = 0
while h >= 0:
h -= a
counter +=1
print(counter)
|
h,a = map(int,input().split())
counter = 0
while h > 0:
h -= a
counter += 1
print(counter)
|
[
"expression.operator.compare.change",
"control_flow.loop.condition.change"
] | 582,609
| 582,610
|
u598684283
|
python
|
p02783
|
H, A = map(int, input().split())
i = 0
while H>=0:
H = H-A
i += 1
print(i)
|
H, A = map(int, input().split())
i = 0
while H >= 1:
H = H-A
i += 1
print(i)
|
[
"literal.number.integer.change",
"control_flow.loop.condition.change"
] | 582,617
| 582,618
|
u710398282
|
python
|
p02783
|
h, a = map(int, input().split())
count = 0
while h >= 0:
h -= a
count += 1
print(count)
|
h, a = map(int, input().split())
count = 0
while h > 0:
h -= a
count += 1
print(count)
|
[
"expression.operator.compare.change",
"control_flow.loop.condition.change"
] | 582,625
| 582,626
|
u125269142
|
python
|
p02783
|
h,a=map(int,input().split())
ans=0
while h>=0:
h-=a
ans+=1
print(ans)
|
h,a=map(int,input().split())
ans=0
while h>0:
h-=a
ans+=1
print(ans)
|
[
"expression.operator.compare.change",
"control_flow.loop.condition.change"
] | 582,631
| 582,632
|
u486773779
|
python
|
p02783
|
h, a = [int(i) for i in input("").split(" ")]
print((h+a-1)/a)
|
h, a = [int(i) for i in input("").split(" ")]
print((h+a-1)//a)
|
[
"expression.operator.arithmetic.change",
"call.arguments.change",
"expression.operation.binary.change",
"io.output.change"
] | 582,638
| 582,639
|
u981758672
|
python
|
p02783
|
H,A = map(int,input().split())
ans = H//A if H == A else H//A+1
print(ans)
|
H,A = map(int,input().split())
ans = H // A if H % A == 0 else H // A+1
print(ans)
|
[
"assignment.value.change"
] | 582,640
| 582,641
|
u131464432
|
python
|
p02783
|
h, a = map(int, input().split())
hits = 0
while h-a > 0:
h = h - a
hits += 1
print(hits)
|
h, a = map(int, input().split())
hits = 0
while h-a > 0:
h = h - a
hits += 1
print(hits + 1)
|
[
"expression.operation.binary.add"
] | 582,642
| 582,643
|
u841021102
|
python
|
p02783
|
H,A = map(int,input().split())
print(--H//A)
|
H,A = map(int,input().split())
print(-(-H//A))
|
[
"call.arguments.change"
] | 582,648
| 582,649
|
u759412327
|
python
|
p02783
|
a,b = input().split()
c = int(a) // int(b)
if c * int(b) == a:
print(c)
else:
print(c + 1)
|
a,b = input().split()
c = int(a) // int(b)
if c * int(b) == int(a):
print(c)
else:
print(c + 1)
|
[
"control_flow.branch.if.condition.change",
"call.add"
] | 582,651
| 582,652
|
u591823813
|
python
|
p02783
|
a,b = map(int,input().split())
print((a+b)//b-1)
|
a,b = map(int,input().split())
print((a+b-1)//b)
|
[
"expression.operation.binary.remove",
"call.arguments.add"
] | 582,664
| 582,665
|
u175590965
|
python
|
p02783
|
import math
H, A = map(int, input().split())
print(math.ceil(H//A))
|
import math
H, A = map(int, input().split())
print(math.ceil(H/A))
|
[
"expression.operator.arithmetic.change",
"call.arguments.change",
"expression.operation.binary.change",
"io.output.change"
] | 582,668
| 582,669
|
u600261652
|
python
|
p02783
|
H, A = map(int,input.split())
count = 0
while H > 0:
H -= A
count += 1
print(count)
|
H, A = map(int,input().split())
count = 0
while H > 0:
H -= A
count += 1
print(count)
|
[
"call.add"
] | 582,670
| 582,671
|
u507145838
|
python
|
p02783
|
import math
H,A = map(int,input().split())
math.ceil(H/A)
|
import math
H,A = map(int,input().split())
print(int(math.ceil(H/A)))
|
[
"call.add",
"call.arguments.add"
] | 582,672
| 582,673
|
u408071652
|
python
|
p02783
|
H, A = map(int, input().split())
if H % A == 0:
print(H/A)
else:
print(H/A + 1)
|
H, A = map(int, input().split())
if H % A == 0:
print(H//A)
else:
print(H//A + 1)
|
[
"expression.operator.arithmetic.change",
"call.arguments.change",
"expression.operation.binary.change",
"io.output.change"
] | 582,674
| 582,675
|
u688587139
|
python
|
p02783
|
h, a = map(int, input().split())
cnt = 0
while h >= 0:
h -= a
cnt += 1
print(cnt)
|
h, a = map(int, input().split())
cnt = 0
while h > 0:
h -= a
cnt += 1
print(cnt)
|
[
"expression.operator.compare.change",
"control_flow.loop.condition.change"
] | 582,678
| 582,679
|
u377072670
|
python
|
p02783
|
print((lambda x: x[0]//x[1])(list(map(int,input().split()))))
|
print((lambda x: (x[0]-1)//x[1]+1)(list(map(int,input().split()))))
|
[
"call.arguments.change"
] | 582,682
| 582,683
|
u121698457
|
python
|
p02783
|
h,a=mp(int,input().split());print(h//a+1 if h%a!=0 else h//a)
|
h,a=map(int,input().split());print(h//a+1 if h%a!=0 else h//a)
|
[
"assignment.value.change",
"identifier.change",
"call.function.change"
] | 582,699
| 582,700
|
u446711904
|
python
|
p02783
|
import math
h, a = map(int, input().split())
print(math.ceil(h // a))
|
import math
h, a = map(int, input().split())
print(math.ceil(h / a))
|
[
"expression.operator.arithmetic.change",
"call.arguments.change",
"expression.operation.binary.change",
"io.output.change"
] | 582,720
| 582,721
|
u049979154
|
python
|
p02783
|
H, A = map(int, input())
n = (H-1)//A + 1
print(n)
|
H, A = map(int, input().split())
n = (H-1)//A + 1
print(n)
|
[
"call.add"
] | 582,726
| 582,727
|
u685244071
|
python
|
p02783
|
H, A = map(int, input().split())
n = H//A +1
print(n)
|
H, A = map(int, input().split())
n = (H-1)//A + 1
print(n)
|
[] | 582,728
| 582,727
|
u685244071
|
python
|
p02783
|
h,a = map(int,input().split())
if h%a==0:
print(h//a)
else:
print(h//a)
|
h,a = map(int,input().split())
if h%a==0:
print(h//a)
else:
print(h//a+1)
|
[
"expression.operation.binary.add"
] | 582,732
| 582,733
|
u217303170
|
python
|
p02783
|
H, A = map(int,input().split())
if(h % A != 0):
print(H // A + 1)
else:
print(H // A)
|
H, A = map(int,input().split())
if(H % A != 0):
print(H // A + 1)
else:
print(H // A)
|
[
"identifier.change",
"control_flow.branch.if.condition.change"
] | 582,734
| 582,735
|
u873736356
|
python
|
p02783
|
from collections import deque
from collections import Counter
from itertools import product, permutations,combinations
from operator import itemgetter
from heapq import heappop, heappush
from bisect import bisect_left, bisect_right, bisect
#pypyではscipy, numpyは使えない
#from scipy.sparse.csgraph import shortest_path, floyd_warshall, dijkstra, bellman_ford, johnson, minimum_spanning_tree
#from scipy.sparse import csr_matrix, coo_matrix, lil_matrix
#import numpy as np
from math import gcd
from math import ceil,floor, sqrt, cos, sin, pi, factorial
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
sys.setrecursionlimit(10**8)
INF = float('inf')
def main():
h, a = map(int, readline().split())
print(h//a+1)
if __name__ == '__main__':
main()
|
from collections import deque
from collections import Counter
from itertools import product, permutations,combinations
from operator import itemgetter
from heapq import heappop, heappush
from bisect import bisect_left, bisect_right, bisect
#pypyではscipy, numpyは使えない
#from scipy.sparse.csgraph import shortest_path, floyd_warshall, dijkstra, bellman_ford, johnson, minimum_spanning_tree
#from scipy.sparse import csr_matrix, coo_matrix, lil_matrix
#import numpy as np
from math import gcd
from math import ceil,floor, sqrt, cos, sin, pi, factorial
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
sys.setrecursionlimit(10**8)
INF = float('inf')
def main():
h, a = map(int, readline().split())
print(ceil(h/a))
if __name__ == '__main__':
main()
|
[
"call.add",
"expression.operator.arithmetic.change",
"call.arguments.change",
"expression.operation.binary.change",
"io.output.change"
] | 582,740
| 582,741
|
u193264896
|
python
|
p02783
|
n,m=map(int,input().split())
print(round(n/m))
|
import math
n,m=map(int,input().split())
print(math.ceil(n/m))
|
[
"call.arguments.change",
"io.output.change"
] | 582,742
| 582,743
|
u901598613
|
python
|
p02783
|
n.m=map(int,input().split())
print(round(n/m))
|
import math
n,m=map(int,input().split())
print(math.ceil(n/m))
|
[
"misc.typo",
"assignment.variable.change",
"call.arguments.change",
"io.output.change"
] | 582,744
| 582,743
|
u901598613
|
python
|
p02783
|
h,a=map(int,input().split())
s=h//a
t=h%a
if a==0:
print(s)
else:
print(s+1)
|
h,a=map(int,input().split())
s=h//a
t=h%a
if t==0:
print(s)
else:
print(s+1)
|
[
"identifier.change",
"control_flow.branch.if.condition.change"
] | 582,745
| 582,746
|
u726154863
|
python
|
p02783
|
H, A = map(int,input().split())
print(H//A + 1 if H//A == 0 else H//A)
|
H, A = map(int,input().split())
print(H//A if H%A == 0 else H//A + 1)
|
[
"expression.operation.binary.remove",
"expression.operator.arithmetic.change",
"call.arguments.change",
"expression.operation.binary.change",
"io.output.change"
] | 582,755
| 582,756
|
u821588465
|
python
|
p02783
|
H,A=map(int,input().split());q=H//A;mod=H%A;print(q+mod)
|
H,A=map(int,input().split());q=H//A;mod=H%A;print(q+min(mod, 1))
|
[
"call.add",
"call.arguments.add",
"call.arguments.change"
] | 582,770
| 582,771
|
u767438459
|
python
|
p02783
|
h, a = map(int, input().split())
print( (h+a-1)/a )
|
h, a = map(int, input().split())
print( int( (h+a-1)/a ) )
|
[
"call.arguments.add",
"call.arguments.change"
] | 582,777
| 582,778
|
u225493896
|
python
|
p02783
|
import math
H, A = map(int, input().split(' '))
print(math.floor(H / A))
|
import math
H, A = map(int, input().split(' '))
print(math.ceil(H / A))
|
[
"misc.opposites",
"identifier.change",
"call.arguments.change",
"io.output.change"
] | 582,781
| 582,782
|
u606878291
|
python
|
p02783
|
H,A = map(int, input().split())
# N = int(input())
# s = int(input())
# C = int(input())
# s= input()
i=1
while H < 0:
H - A
i += 1
print(i)
|
H,A = map(int, input().split())
# N = int(input())
# s = int(input())
# C = int(input())
# s= input()
i=0
while H > 0:
H = H - A
i += 1
print(i)
|
[
"literal.number.integer.change",
"assignment.value.change",
"misc.opposites",
"expression.operator.compare.change",
"control_flow.loop.condition.change"
] | 582,785
| 582,786
|
u027403702
|
python
|
p02783
|
H,A = map(int, input().split())
# N = int(input())
# s = int(input())
# C = int(input())
# s= input()
i=0
while H < 0:
H - A
i += 1
print(i)
|
H,A = map(int, input().split())
# N = int(input())
# s = int(input())
# C = int(input())
# s= input()
i=0
while H > 0:
H = H - A
i += 1
print(i)
|
[
"misc.opposites",
"expression.operator.compare.change",
"control_flow.loop.condition.change"
] | 582,787
| 582,786
|
u027403702
|
python
|
p02783
|
H,A = map(int,input().split())
import math
print(math.ceil(H//A))
|
H,A = map(int,input().split())
import math
print(math.ceil(H/A))
|
[
"expression.operator.arithmetic.change",
"call.arguments.change",
"expression.operation.binary.change",
"io.output.change"
] | 582,792
| 582,793
|
u591524911
|
python
|
p02783
|
H, A = map(int, input().split())
if H%A==0:
print(H//A+1)
else:
print(H//A+1)
|
H, A = map(int, input().split())
if H%A==0:
print(H//A)
else:
print(H//A+1)
|
[
"expression.operation.binary.remove"
] | 582,796
| 582,797
|
u266113953
|
python
|
p02783
|
h, a = map(int, input().split)
if h % a == 0:
print(h//a)
else:
print(h//a + 1)
|
h, a = map(int, input().split())
if h % a == 0:
print(h//a)
else:
print(h//a + 1)
|
[
"call.add"
] | 582,802
| 582,803
|
u175746978
|
python
|
p02783
|
import math
H, A = map(int, input().split())
print(math.floor(H/A))
|
import math
H, A = map(int, input().split())
print(math.ceil(H/A))
|
[
"misc.opposites",
"identifier.change",
"call.arguments.change",
"io.output.change"
] | 582,812
| 582,813
|
u419877586
|
python
|
p02783
|
H, A=map(int, input().split())
print((H+1)//A)
|
H, A=map(int, input().split())
print((H-1)//A+1)
|
[
"misc.opposites",
"expression.operator.arithmetic.change",
"call.arguments.change",
"expression.operation.binary.change",
"io.output.change"
] | 582,814
| 582,815
|
u419877586
|
python
|
p02783
|
H,A = map(int,input())
count = 0
while H > 0:
H -= A
count += 1
print(count)
|
H,A = map(int,input().split())
count=0
while H>0:
H -= A
count +=1
print(count)
|
[
"call.add"
] | 582,824
| 582,825
|
u828139046
|
python
|
p02783
|
a,b=map(int,input().split())
i=0
while a>=0:
a-=b
i+=1
print(i)
|
a,b=map(int,input().split())
i=0
while a>0:
a-=b
i+=1
print(i)
|
[
"expression.operator.compare.change",
"control_flow.loop.condition.change"
] | 582,834
| 582,835
|
u631579948
|
python
|
p02783
|
a,b=map(int,input().split())
i=0
while a>b:
a-=b
i+=1
print(i)
|
a,b=map(int,input().split())
i=0
while a>0:
a-=b
i+=1
print(i)
|
[
"identifier.replace.remove",
"literal.replace.add",
"control_flow.loop.condition.change"
] | 582,836
| 582,835
|
u631579948
|
python
|
p02783
|
import math
H, A = map(int, input().split())
print(math.ceil(H,A))
|
import math
H, A = map(int, input().split())
print(math.ceil(H/A))
|
[
"call.arguments.change",
"io.output.change"
] | 582,846
| 582,847
|
u550535134
|
python
|
p02783
|
h, a = input().split;
h = int(h);
a = int(a);
if h % a == 0:
ans = int(h // a);
else:
ans = int(h // a + 1);
print(ans);
|
h, a = input().split();
h = int(h);
a = int(a);
if h % a == 0:
ans = int(h // a);
else:
ans = int(h // a + 1);
print(ans);
|
[
"call.add"
] | 582,854
| 582,855
|
u508061226
|
python
|
p02783
|
n,p = map(int, input().split())
count = 0
if (n>0):
n = n-p
count = count +1
print(count)
|
n,p = map(int, input().split())
count = 0
while(n>0):
n = n-p
count = count +1
print(count)
|
[
"control_flow.branch.while.replace.add",
"control_flow.loop.if.replace.remove"
] | 582,862
| 582,863
|
u088115428
|
python
|
p02782
|
r1, c1, r2, c2 = map(int, input().split())
MOD = 10 ** 9 + 7
g1 = [1, 1]
g2 = [1, 1]
inverse = [0, 1]
def func(r, c):
if c == 0:
return r + 1
return comb(r + c + 2, c + 1, MOD)
def comb(n, r, mod):
return (g1[n] * g2[r] * g2[n - r]) % mod
for i in range(2, r2 + c2 + 10):
g1.append((g1[-1] * i) % MOD)
inverse.append((-inverse[MOD % i] * (MOD // i) ) % MOD)
g2.append((g2[-1] * inverse[-1]) % MOD)
print((func(r2, c2) - func(r1 - 1, c2) - func(r2, c1 - 1) + func(r1 - 1, c1 - 1) % MOD))
|
r1, c1, r2, c2 = map(int, input().split())
MOD = 10 ** 9 + 7
g1 = [1, 1]
g2 = [1, 1]
inverse = [0, 1]
def func(r, c):
if c == 0:
return r + 1
return comb(r + c + 2, c + 1, MOD)
def comb(n, r, mod):
return (g1[n] * g2[r] * g2[n - r]) % mod
for i in range(2, r2 + c2 + 10):
g1.append((g1[-1] * i) % MOD)
inverse.append((-inverse[MOD % i] * (MOD // i) ) % MOD)
g2.append((g2[-1] * inverse[-1]) % MOD)
print((func(r2, c2) - func(r1 - 1, c2) - func(r2, c1 - 1) + func(r1 - 1, c1 - 1)) % MOD)
|
[
"call.arguments.change"
] | 582,876
| 582,877
|
u296518383
|
python
|
p02782
|
import sys
MOD = 10 ** 9 + 7
def make_table(size=10**6+2, p=MOD):
fac = [None] * (size + 1)
fac[0] = 1
for i in range(size):
fac[i+1] = fac[i] * (i + 1) % p
ifac = [None] * (size + 1)
ifac[size] = pow(fac[size], p-2, p)
for i in range(size, 0, -1):
ifac[i-1] = ifac[i] * i % p
return fac, ifac
fac, ifac = make_table()
def comb(n, r, mod=MOD):
if r > n or r < 0:
return 0
return fac[n] * ifac[r] % mod * ifac[n-r] % mod
def g(y, x):
return comb(y+x+2, y+1) - 1
r1, c1, r2, c2 = map(int, sys.stdin.readline().split())
def main():
ans = g(r2, c2) - (g(r1-1, c2) + g(r2, c1-1) - g(r1-1, c1-1)) % MOD
return ans
if __name__ == '__main__':
ans = main()
print(ans)
|
import sys
MOD = 10 ** 9 + 7
def make_table(size=2*10**6+2, p=MOD):
fac = [None] * (size + 1)
fac[0] = 1
for i in range(size):
fac[i+1] = fac[i] * (i + 1) % p
ifac = [None] * (size + 1)
ifac[size] = pow(fac[size], p-2, p)
for i in range(size, 0, -1):
ifac[i-1] = ifac[i] * i % p
return fac, ifac
fac, ifac = make_table()
def comb(n, r, mod=MOD):
if r > n or r < 0:
return 0
return fac[n] * ifac[r] % mod * ifac[n-r] % mod
def g(y, x):
return comb(y+x+2, y+1) - 1
r1, c1, r2, c2 = map(int, sys.stdin.readline().split())
def main():
ans = (g(r2, c2) - (g(r1-1, c2) + g(r2, c1-1) - g(r1-1, c1-1))) % MOD
return ans
if __name__ == '__main__':
ans = main()
print(ans)
|
[
"expression.operation.binary.add"
] | 583,111
| 583,110
|
u254871849
|
python
|
p02782
|
r1,c1,r2,c2=map(int,input().split())
a=r2-r1+1
b=c2-c1+1
m=max(a,b)
n=min(a,b)
mod=10**9+7
def framod(n, mod, a=1):
for i in range(1,n+1):
a=a * i % mod
return a
def comb(n, k, mod):
a=framod(n, mod)
b=framod(k, mod)
c=framod(n-k, mod)
return (a * pow(b, mod-2, mod) * pow(c, mod-2, mod)) % mod
def f(x,y):
return comb(x+y+2,y+1)-1
print((f(r2,c2)-f(r2,c1-1)-f(r1-1,c2)+f(r1-1,c1-1))%mod)
|
r1,c1,r2,c2=map(int,input().split())
a=r2-r1+1
b=c2-c1+1
m=max(a,b)
n=min(a,b)
mod=10**9+7
def framod(n, mod, a=1):
for i in range(1,n+1):
a=a * i % mod
return a
def comb(n, k, mod):
a=framod(n, mod)
b=framod(k, mod)
c=framod(n-k, mod)
return (a * pow(b, mod-2, mod) * pow(c, mod-2, mod)) % mod
def f(x,y):
return comb(x+y+2,y+1,mod)-1
print((f(r2,c2)-f(r2,c1-1)-f(r1-1,c2)+f(r1-1,c1-1))%mod)
|
[
"call.arguments.add"
] | 583,232
| 583,233
|
u747220349
|
python
|
p02783
|
# ceil関数(2引数)
def ceilT(a,b): #ceil(a/b)
return (a+b-1)//b
H,A=map(int,input().split())
print(ceil(H,A))
|
# ceil関数(2引数)
def ceilT(a,b): #ceil(a/b)
return (a+b-1)//b
H,A=map(int,input().split())
print(ceilT(H,A))
|
[
"identifier.change",
"call.function.change",
"call.arguments.change",
"io.output.change"
] | 583,254
| 583,255
|
u202570162
|
python
|
p02783
|
h,a=map(int,input().split())
l=0
while h>=0:
h = h-a
l += 1
print(l)
|
h,a=map(int,input().split())
l=0
while h>0:
h = h-a
l += 1
print(l)
|
[
"expression.operator.compare.change",
"control_flow.loop.condition.change"
] | 583,265
| 583,266
|
u519939795
|
python
|
p02783
|
H, A = map(int, input().split())
print(H // A if H <= A else (H // A) + 1)
|
H, A = map(int, input().split())
print(H // A if H % A == 0 else (H // A) + 1)
|
[
"call.arguments.change",
"io.output.change"
] | 583,278
| 583,279
|
u745562158
|
python
|
p02783
|
H, A = map(int, input().split())
print(H // A if H == A else (H // A) + 1)
|
H, A = map(int, input().split())
print(H // A if H % A == 0 else (H // A) + 1)
|
[
"call.arguments.change",
"io.output.change"
] | 583,280
| 583,279
|
u745562158
|
python
|
p02783
|
H, A = map(int, input().split())
print(H // A if H == A else H // A + 1)
|
H, A = map(int, input().split())
print(H // A if H % A == 0 else (H // A) + 1)
|
[
"call.arguments.change",
"io.output.change"
] | 583,281
| 583,279
|
u745562158
|
python
|
p02783
|
H, A = map(int,input().split())
print(H//A+1)
|
H, A = map(int,input().split())
print(-(-H//A))
|
[
"expression.operation.binary.remove",
"call.arguments.change"
] | 583,282
| 583,283
|
u310855433
|
python
|
p02783
|
H,A=map(int,input().split())
if H%A==0:
print(H//A)
else:
print((H/A)+1)
|
H,A=map(int,input().split())
if H%A==0:
print(H//A)
else:
print((H//A)+1)
|
[
"expression.operator.arithmetic.change",
"call.arguments.change",
"expression.operation.binary.change",
"io.output.change"
] | 583,286
| 583,287
|
u455642216
|
python
|
p02783
|
H,A=map(int,input().split())
if H%A==0:
print(H//A)
else:
print((H/A,0)+1)
|
H,A=map(int,input().split())
if H%A==0:
print(H//A)
else:
print((H//A)+1)
|
[
"expression.operator.arithmetic.change",
"call.arguments.change",
"expression.operation.binary.change",
"io.output.change"
] | 583,288
| 583,287
|
u455642216
|
python
|
p02783
|
H,A=map(int,input().split())
if H%A==0:
print(H//A)
else:
print((round(H/A,0))+1)
|
H,A=map(int,input().split())
if H%A==0:
print(H//A)
else:
print((H//A)+1)
|
[
"call.remove",
"expression.operator.arithmetic.change",
"call.arguments.change",
"expression.operation.binary.change",
"io.output.change"
] | 583,289
| 583,287
|
u455642216
|
python
|
p02783
|
H,A = map(int, input().split())
print(math.ceil(H/A))
|
import math
H,A = map(int, input().split())
print(math.ceil(H/A))
|
[] | 583,294
| 583,295
|
u451206510
|
python
|
p02783
|
H, A = map(int,input().split())
count = 0
while H >= 0:
H -= A
count += 1
print(count)
|
# ABC153_A
H, A = map(int,input().split())
count = 0
while H > 0:
H -= A
count += 1
print(count)
|
[
"expression.operator.compare.change",
"control_flow.loop.condition.change"
] | 583,300
| 583,301
|
u519721530
|
python
|
p02783
|
H,A = map(int,input().split())
print(H // A + 1)
|
H,A = map(int,input().split())
print((H - 1) // A + 1)
|
[
"call.arguments.change"
] | 583,302
| 583,303
|
u026402121
|
python
|
p02783
|
import math
h, a = list(map(int, input().split()))
print(int(math.floor(h/a)))
|
import math
h, a = list(map(int, input().split()))
print(int(math.ceil(h/a)))
|
[
"misc.opposites",
"identifier.change",
"call.arguments.change"
] | 583,313
| 583,314
|
u915879510
|
python
|
p02783
|
import math
h, a = list(map(int, input().split()))
print(math.floor(h/a))
|
import math
h, a = list(map(int, input().split()))
print(int(math.ceil(h/a)))
|
[
"call.arguments.add",
"misc.opposites",
"identifier.change",
"call.arguments.change",
"io.output.change"
] | 583,315
| 583,314
|
u915879510
|
python
|
p02783
|
H,A = (int(x) for x in input().split())
if H <= A:
print(1)
if H % A != 0:
print((H//A)+1)
else:
print(H//A)
|
H,A = (int(x) for x in input().split())
if H <= A:
print(1)
elif H % A != 0:
print((H//A)+1)
else:
print(H//A)
|
[
"control_flow.branch.if.replace.remove",
"control_flow.branch.else_if.replace.add"
] | 583,316
| 583,317
|
u250828304
|
python
|
p02783
|
attack,health = map(int,input().split())
if health % attack == 0 :
print ( health // attack )
else :
print ( health // attack + 1 )
|
health,attack = map(int,input().split())
if health % attack == 0 :
print ( health // attack )
else :
print ( health // attack + 1 )
|
[] | 583,343
| 583,344
|
u354623416
|
python
|
p02783
|
attack,health = map(int,input().split())
if health % attack == 0 :
print ( health // attack )
else :
print ( health % attack + 1 )
|
health,attack = map(int,input().split())
if health % attack == 0 :
print ( health // attack )
else :
print ( health // attack + 1 )
|
[
"expression.operator.arithmetic.change",
"call.arguments.change",
"expression.operation.binary.change",
"io.output.change"
] | 583,345
| 583,344
|
u354623416
|
python
|
p02783
|
H,A=map(int,input().split())
ans=round(H/A)
print(ans)
|
H,A=map(int,input().split())
import math
ans=math.ceil(H/A)
print(ans)
|
[
"assignment.value.change"
] | 583,349
| 583,350
|
u642418876
|
python
|
p02783
|
import math
h, a = map(int,input().split())
num = math.floor(h/a)+1
print(num)
|
import math
h, a = map(int,input().split())
num = math.ceil(h/a)
print(num)
|
[
"misc.opposites",
"assignment.value.change",
"identifier.change",
"expression.operation.binary.change",
"expression.operation.binary.remove"
] | 583,353
| 583,354
|
u658325491
|
python
|
p02783
|
H, A = map(int, input().split())
print((H+A-1)/A)
|
H, A = map(int, input().split())
print((H+A-1)//A)
|
[
"expression.operator.arithmetic.change",
"call.arguments.change",
"expression.operation.binary.change",
"io.output.change"
] | 583,362
| 583,363
|
u809541036
|
python
|
p02783
|
def main():
h,a = map(int, input().split())
if h <= a:
print(1)
elif h%a== 0:
print(h//a)
else:
print(h%a+1)
if __name__ == '__main__':
main()
|
def main():
h,a = map(int, input().split())
if h <= a:
print(1)
elif h%a== 0:
print(h//a)
else:
print(h//a+1)
if __name__ == '__main__':
main()
|
[
"expression.operator.arithmetic.change",
"call.arguments.change",
"expression.operation.binary.change",
"io.output.change"
] | 583,364
| 583,365
|
u624617831
|
python
|
p02783
|
h, a = map(int, input().split())
q, mod = divmod(h, a)
if mod != 0:
print(q)
else:
print(q+1)
|
h, a = map(int, input().split())
q, mod = divmod(h, a)
if mod == 0:
print(q)
else:
print(q+1)
|
[
"misc.opposites",
"expression.operator.compare.change",
"control_flow.branch.if.condition.change"
] | 583,375
| 583,376
|
u323045245
|
python
|
p02783
|
##i18n##
a = input().split()
H = int(a[0])
A = int(a[1])
num = H // A
remain = H % A
if A >= H:
out = 1
else:
if remain > 0:
out = num + 1
else:
out = num
print(num)
|
##i18n##
a = input().split()
H = int(a[0])
A = int(a[1])
num = H // A
remain = H % A
if A >= H:
out = 1
else:
if remain > 0:
out = num + 1
else:
out = num
print(out)
|
[
"identifier.change",
"call.arguments.change",
"io.output.change"
] | 583,377
| 583,378
|
u267029978
|
python
|
p02783
|
h,a=map(int,input().split())
count=0
while h>=0:
h-=a
count+=1
print(count)
|
h,a=map(int,input().split())
count=0
while h>0:
h-=a
count+=1
print(count)
|
[
"expression.operator.compare.change",
"control_flow.loop.condition.change"
] | 583,383
| 583,384
|
u903179665
|
python
|
p02783
|
h,a = map(int,input().split())
n = 0
while h > 0:
n += 1
h -= a
|
h,a = map(int,input().split())
n = 0
while h > 0:
n += 1
h -= a
print(n)
|
[
"call.add"
] | 583,389
| 583,390
|
u446371873
|
python
|
p02783
|
h, a = map(int, input().split())
print(h // a + boll(h % a))
|
h, a = map(int, input().split())
print(h // a + bool(h % a))
|
[
"identifier.change",
"call.function.change",
"call.arguments.change",
"expression.operation.binary.change",
"io.output.change"
] | 583,398
| 583,399
|
u874301476
|
python
|
p02783
|
from sys import stdin
H,A = [int(x) for x in stdin.readline().rstrip().split()]
if H%A==0:
print(H/A)
elif A>H :
print(1)
else :
print(1+H/A)
|
from sys import stdin
H,A = [int(x) for x in stdin.readline().rstrip().split()]
if H%A==0:
print(int(H/A))
elif A>H :
print(1)
else :
print(1+int(H/A))
|
[
"call.arguments.add",
"call.arguments.change",
"call.add"
] | 583,402
| 583,403
|
u396210538
|
python
|
p02783
|
H, A = map(int, input().split())
if N % A == 0:
print(H // A)
else:
print(H // A + 1)
|
H, A = map(int, input().split())
if H % A == 0:
print(H // A)
else:
print(H // A + 1)
|
[
"identifier.change",
"control_flow.branch.if.condition.change"
] | 583,406
| 583,407
|
u417096287
|
python
|
p02783
|
h,a=map(int,input().split())
t=h%a
if(t>0):
print((h//a)+t)
else:
print(h//a)
|
h,a=map(int,input().split())
t=h%a
if(t>0):
print((h//a)+1)
else:
print(h//a)
|
[
"identifier.replace.remove",
"literal.replace.add",
"call.arguments.change",
"expression.operation.binary.change",
"io.output.change"
] | 583,413
| 583,414
|
u129978636
|
python
|
p02783
|
import math
n, m = int(input().split())
print(math.ceil(n/m))
|
import math
n, m = map(int, input().split())
print(math.ceil(n/m))
|
[
"assignment.value.change",
"identifier.change",
"call.function.change",
"call.arguments.add"
] | 583,415
| 583,416
|
u340494803
|
python
|
p02783
|
import math
n, m = input().split()
print(math.ceil(n/m))
|
import math
n, m = map(int, input().split())
print(math.ceil(n/m))
|
[
"call.add",
"call.arguments.change"
] | 583,417
| 583,416
|
u340494803
|
python
|
p02783
|
a,b=map(int,input().split())
print(-(-a/b))
|
a,b=map(int,input().split())
print(-(-a//b))
|
[
"expression.operator.arithmetic.change",
"call.arguments.change",
"expression.operation.binary.change",
"io.output.change"
] | 583,422
| 583,423
|
u123745130
|
python
|
p02783
|
a,b=map(int,input(),split())
print(-(-a/b))
|
a,b=map(int,input().split())
print(-(-a//b))
|
[
"assignment.value.change",
"call.arguments.change",
"expression.operator.arithmetic.change",
"expression.operation.binary.change",
"io.output.change"
] | 583,424
| 583,423
|
u123745130
|
python
|
p02783
|
h,a = map(int, input().split)
ans = 0
if h % a == 0:
ans = h // a
else:
ans = h // a + 1
print(ans)
|
h,a = map(int, input().split())
ans = 0
if h % a == 0:
ans = h // a
else:
ans = h // a + 1
print(ans)
|
[
"call.add"
] | 583,427
| 583,428
|
u923270446
|
python
|
p02783
|
H,A=map(int,input().spkit())
if H%A==0:
print(H//A)
else:
print((H//A)+1)
|
H,N=map(int,input().split())
if H%N==0:
print(H//N)
else:
print((H//N)+1)
|
[
"assignment.variable.change",
"identifier.change",
"assignment.value.change",
"call.arguments.change",
"control_flow.branch.if.condition.change",
"expression.operation.binary.change",
"io.output.change"
] | 583,431
| 583,432
|
u996731299
|
python
|
p02783
|
H, A = map(int, input().split())
cnt = 1
while H > 0:
H -= A
cnt += 1
print(cnt)
|
H, A = map(int, input().split())
cnt = 0
while H > 0:
H -= A
cnt += 1
print(cnt)
|
[
"literal.number.integer.change",
"assignment.value.change"
] | 583,439
| 583,440
|
u226082503
|
python
|
p02783
|
h, a = map(int, input().split())
print(h//a)
|
h, a = map(int, input().split())
print( - ( - h // a))
|
[
"call.arguments.change"
] | 583,499
| 583,500
|
u237634011
|
python
|
p02783
|
H,A=map(int,input().split())
cnt=0
while H >= 0:
cnt=cnt+1
H=H-A
print(cnt)
|
H,A=map(int,input().split())
cnt=0
while H > 0:
cnt=cnt+1
H=H-A
print(cnt)
|
[
"expression.operator.compare.change",
"control_flow.loop.condition.change"
] | 583,503
| 583,504
|
u486209657
|
python
|
p02783
|
h,a = map(int,input().split())
print(h//a+map(h%a!=0))
|
h,a = map(int,input().split())
print(h//a+(h%a!=0))
|
[
"call.arguments.change"
] | 583,507
| 583,508
|
u405733072
|
python
|
p02783
|
H, A = map(int, input().split())
count = 0
while(H >= 0):
H = H - A
count = count + 1
print(count)
|
H, A = map(int, input().split())
count = 0
while(H > 0):
H = H - A
count = count + 1
print(count)
|
[
"expression.operator.compare.change",
"control_flow.loop.condition.change"
] | 583,509
| 583,510
|
u573332356
|
python
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.