problem_id stringclasses 100
values | submission_id stringlengths 10 10 | status stringclasses 2
values | code stringlengths 6 806 |
|---|---|---|---|
p03861 | s194029043 | Wrong Answer | a, b, x = map(int, input().split())
print(b//x-a//x+1 if (b%x)+(a%x)==0 else b//x-a//x) |
p03861 | s285544098 | Wrong Answer | a, b, c = map(int, input().split())
cnt = 0
for i in range(a,b):
if i % c == 0:
cnt = i
break
else:
continue
print(1 + (b - cnt) // c) |
p03861 | s160260428 | Wrong Answer | a, b, x = map(int, input().split())
max = b // x
if a == 0:
before = 0
else:
before = (a - 1) // x
print(max - before) |
p03861 | s115686353 | Wrong Answer | a, b, x = map(int,input().split())
a2 = -(-a // x) * x
b2 = -(-b // x) * x
print((b2 - a2) // x + 1) |
p03861 | s025691362 | Wrong Answer | import sys
def input(): return sys.stdin.readline().strip()
def I(): return int(input())
def LI(): return list(map(int, input().split()))
a, b, x = LI()
acnt = (a - 1) // x if a != 0 else 0
bcnt = b // x
ans = bcnt - acnt
print(ans)
|
p03861 | s189723147 | Wrong Answer | a, b, x = map(int, input().split())
start = a if a % x == 0 else a // x + x
ans = max(0, b - start) // x + 1
print(ans)
|
p03861 | s298525605 | Wrong Answer | a, b, x = map(int, input().split())
if b-a < x or b < x:
print(0)
else:
ans = (b//x)-((a-1)//x)
print(ans)
|
p03861 | s316321827 | Wrong Answer | a, b, x = map(int, input().split())
if a % x == 0 and x != 1:
print((b - a + 1) // x + 1)
else:
print((b - a + 1) // x)
|
p03861 | s412640948 | Wrong Answer | a,b,x = map(int,input().split())
print(int(b//x)-int(a//x)) |
p03861 | s254549519 | Wrong Answer | import math
a, b, x = map(int, input().split())
ini = math.ceil(a / x)
end = b // x
print(end - ini + 1) |
p03861 | s879639799 | Wrong Answer | A,B,C = list(map(int,input().split()))
print((B-A+1)//C) |
p03861 | s053679682 | Wrong Answer | a,b,x=map(int,input().split())
count=0
count+=(b-a)//x
if a==b and a%x==0:
count+=1
elif a%x==0:
count+=1
elif b%x==0:
count+=1
print(count) |
p03861 | s275865287 | Wrong Answer | a, b, x = map(int, input().split())
if b-a < x or b < x:
print(0)
else:
ans = (b//x)-(a//x)
if a % x == 0:
ans += 1
print(ans)
|
p03861 | s490492353 | Wrong Answer | a, b, x = map(int, input().split())
count = 0
if a % x != 0 and b % x != 0:
print((b-a)//x)
else:
print((b-a)//x + 1) |
p03861 | s005245347 | Wrong Answer | a, b, x = map(int, input().split(" "))
n = b//x+1
if a>0:
m = a//x+1
else:
m=0
ans = n-m
print("{}".format(ans)) |
p03861 | s184798545 | Wrong Answer | import math
import sys
import numpy as np
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
# ----------------------------------------
a, b, x = map(int, read().split())
'''
num = b - a + 1
arr = np.linspace(a, b, num)
div = np.where(arr % x == 0)
ans = div[0][0]
'''
if (b < x):
ans = 0
else:
bx = b // x
ax = a // x
ans = bx - ax
if (a % x == 0):
ans += 1
print(ans)
|
p03861 | s155356220 | Wrong Answer | import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
a, b, x = map(int, readline().split())
ans = b // x - (a - 1) // x
if a == 0:
ans += 1
print(ans)
|
p03861 | s393287987 | Wrong Answer | a,b,x=map(int,input().split())
print(b//x-(a//x))
|
p03861 | s360598132 | Wrong Answer | #https://atcoder.jp/contests/abc048/tasks/abc048_b
import math
a,b,x=map(int,input().split())
max_num=math.floor(b/x)
min_num=math.ceil(a/x)
print(max_num-min_num+1) |
p03861 | s274349192 | Wrong Answer | import sys
def input(): return sys.stdin.readline().strip()
def I(): return int(input())
def LI(): return list(map(int, input().split()))
a, b, x = LI()
acnt = (a - 1) // x if a != 0 else 0
bcnt = b // x if b != 0 else 1
ans = bcnt - acnt
print(ans)
|
p03861 | s649908747 | Wrong Answer | a,b,x=map(int,input().split())
k=b-a+1
if a%x!=0 and a!=0:
k2=x-(a%x)+1
elif a%x==0 and a!=0:
k2=1
else:
k2=x+1
k-=k2
if k<=0 and a!=0:
print(0)
elif k<=0 and a==0:
print(1)
else:
print(k//x+1)
|
p03861 | s410726546 | Wrong Answer | a,b,x=map(int, input().split())
print(b//x-a//x) |
p03861 | s154324668 | Wrong Answer | a, b, x = map(int, input().split())
def calc(n):
if n <= -1 :
cnt = 0
else:
cnt = int( n / x ) + 1
return int(cnt)
cnt_a = calc(a-1)
cnt_b = calc(b)
ans = cnt_b - cnt_a
print(int(ans)) |
p03861 | s106537026 | Wrong Answer | a, b, x = map(int,input().split())
r = 0
b_a = b - a +1
r = b_a // x
r += 1
print(int(r)) |
p03861 | s858610351 | Wrong Answer | a,b,x = map(int,input().split())
tmp = 0
if b-a>=x:
if a%x==0 or b%x==0:
tmp += 1
print((b-a)//x+tmp)
else:
if a%x+b%x==x and a<=x<=b:
tmp += 1
print(tmp) |
p03861 | s963661838 | Wrong Answer | # coding: utf-8
a, b, x = map(int, input().split(" "))
if (a % x) != 0:
start_v = a + x - (a % x)
else:
start_v = a
print((b - start_v + 1) // x)
|
p03861 | s703719402 | Wrong Answer | a,b,x = map(int, input().split())
print((b-a)//x+1 if (a*b)%x==0 else (b-a)//x) |
p03861 | s819158200 | Wrong Answer | a,b,x=map(int,input().split())
if a==0:
ans=b//x
else:
ans=(b//x)-((a-1)//x)
print(ans) |
p03861 | s557036126 | Wrong Answer | a,b,x=map(int,input().split())
if a%x==0:
a-=x
elif b%x==0:
b+=x
count=(b-a)//x
if count<0:
count=0
print(count) |
p03861 | s261764556 | Wrong Answer | x = list(map(int,input().split()))
a = 0
b = x[1]+1
for i in range(min(x[1],max(x[2],x[0])),x[1]+1):
if i % x[2] ==0:
a = 1
b=i
break
c = (x[1]-b)//x[2] + 1
print(c) |
p03861 | s180185171 | Wrong Answer | a,b,x=map(int,input().split())
print(b//x-a//x) |
p03861 | s936121826 | Wrong Answer | a,b,k=map(int,input().split())
x=a//k
y=b//k
res=y-x
if a%k==0 and b%k==0 and x<y:
res+=1
print(res)
|
p03861 | s524611429 | Wrong Answer | a, b, x = map(int, input().split())
if a == 0 and b == 0:
print(1)
elif a % x == 0 and x != 1:
print((b - a + 1) // x + 1)
else:
print((b - a + 1) // x)
|
p03861 | s398087906 | Wrong Answer | def f(n, x):
ans = 0
if (0 <= n):
ans = n // x
return ans
if __name__ == "__main__":
a, b, x = map(int, input().split())
print(f(b, x) - f(a - 1, x))
|
p03861 | s881785434 | Wrong Answer | a,b,x = map(int,input().split())
ans = (b-a+1)//x
if a%x == 0 and b%x == 0:
ans = ans + 1
if x == 1:
ans = ans - 1
print(ans) |
p03861 | s884429230 | Wrong Answer | import math
a,b,x = map(int, input().split())
A = math.ceil (a/x)
B = math.floor (b/x)
print (B-A+1)
|
p03861 | s637722663 | Wrong Answer | a,b,x = map(int, input().split())
count=0
if a<=x :
ai = x
else:
ai = (a//x)*x
if ai<a :
ai +=x
if ai<=b :
count+=1
count+=(b-ai)//x
print(count)
|
p03861 | s275286450 | Wrong Answer | a, b, x = map(int, input().split())
ans = (b-a)//x
if a//x:
ans += 1
print(ans) |
p03861 | s335127284 | Wrong Answer | a, b, x = map(int, input().split())
ans = (b - a + 1) // x
if a % x == 0 and b % x == 0:
ans += 1
print(ans) |
p03861 | s927379242 | Wrong Answer | a,b,x=map(int,input().split())
if a%x!=0:
a+=x-a%x
if a>=b:
print(0)
elif b//x==0:
print(0)
else:
print(b//x-a//x+1) |
p03861 | s575822642 | Wrong Answer | a,b,x=map(int,input().split())
if a==b:
print(0)
else:
if a%x==0 and b%x==0:
print(b//x-a//x+1)
else:
print(b//x-a//x) |
p03861 | s964538857 | Wrong Answer | # coding: utf-8
a, b, x = map(int, input().split(" "))
def f(n):
if n == 0:
return 0
else:
return n // 2 + 1
print(f(b) - f(a))
|
p03861 | s434710131 | Wrong Answer | import math
a, b, x = map(int,input().split())
if b//x == a//x:
print(0)
elif a//x == 0:
print(b//x - a//x)
else:
print(b//x - a//x + 1) |
p03861 | s332487182 | Wrong Answer | import math
a,b,x = map(int,input().split())
if b == 0:
print(0)
s = math.floor(b / x)
if a == 0:
print(s + 1)
else:
k = math.floor((a - 1) / x)
print(s - k) |
p03861 | s100743466 | Wrong Answer | a, b, x = map(int, input().split())
flg = False
for i in range(a, b + 1):
if i % x == 0:
flg = True
res = b // x - a // x + 1
break
if flg:
print(res)
else:
print(0) |
p03861 | s692621459 | Wrong Answer | a,b,x = map(int,input().split())
if a > x or b < x:
print("0")
else:
print(b//x-a//x)
|
p03861 | s014684327 | Wrong Answer | a, b, x = map(int, input().split())
if x == 1:
print(b - a + 1)
exit()
if a == b:
print(0)
exit()
print(b // x - (a-1) // x) |
p03861 | s187815094 | Wrong Answer | a, b, x = map(int, input().split())
ans = 0
ans += (b-a) // x
if(b-a) % x == 0 and a % x == 0 and b % x == 0:
ans += 1
print(ans)
|
p03861 | s056805017 | Wrong Answer | a, b, x = map(int, input().split())
if a == 0:
print(b // x)
else:
print(b // x - (a - 1) // x) |
p03861 | s259007860 | Wrong Answer | a, b, c = map(int, input().split())
if a == 0:
print(b // c)
exit()
print(b // c - (a-1) // c) |
p03861 | s495803471 | Wrong Answer | a, b, x = map(int, input().split())
ans = (b-a)//x
if a%x == 0:
ans += 1
elif b%x == 0:
ans += 1
print(ans) |
p03861 | s918742195 | Wrong Answer | a,b,x=map(int,input().split())
ans=0
if a==0:
ans+=1
if a==b:
print(0)
exit()
if x>b:
print(ans)
elif a<=x<=b:
ans+=(b//x)
print(ans)
else:
for i in range(a,b+1):
if i%x==0:
ans+=(b-i)//x
print(ans+1)
break |
p03861 | s548632563 | Wrong Answer | a,b,c = map(int,input().split())
print(a//c-b//c) |
p03861 | s985138437 | Wrong Answer | a, b, x = [int(_) for _ in input().split()]
count = b//x - a//x
if a%x == 0 and a != 0:
count += 1
print(count) |
p03861 | s073208597 | Wrong Answer | a,b,x = map(int, input().split())
ax = max(0,(a-1)//x)
bx = b//x
#print(ax)
#print(bx)
print(bx-ax+1) |
p03861 | s856885409 | Wrong Answer | x,y,z=list(map(int, input().split()))
ans=0
if (y-x)//z==0:
if x%z > y%z:
ans=ans+1
if x%z==0 or y%z==0:
print(1)
else:
print(ans)
else:
if x%z==0 or y%z==0:
print(((y-x)//z)+1)
else:
print((y-x)//z) |
p03861 | s394356053 | Wrong Answer | a,b,x = map(int,input().split())
if a == 0:
ans = b//x + 1
else:
ans = (b-a+1)//x
if a%x == 0 and b%x == 0:
ans = ans + 1
if x == 1:
ans = ans - 1
print(ans) |
p03861 | s972687735 | Wrong Answer | a,b,x = map(int,input().split())
A = a//x
B = b//x
if a == 0:
print(B-A+1)
elif b%x == 0:
print(B-A+1)
else:
print(B-A) |
p03861 | s086350583 | Wrong Answer | a,b,x = map(int, input().split())
if a%x==0:
A=a//x
else:
A=a//x+1
B=b//x
print(0 if B-A==0 else B-A+1) |
p03861 | s034249399 | Wrong Answer | a,b,c = list(map(int,input().split()))
x = a//c
if a%c:
x=a//c-1
y = b//c
print(y-x) |
p03861 | s556247953 | Wrong Answer | i,j,n=map(int,input().split())
i_num=i/n
j_num=j/n
cnt=j_num-i_num
#print(cnt)
if i_num % n==0:
cnt+=1
print(int(cnt))
|
p03861 | s520738886 | Wrong Answer | a, b, x = map(int, input().split())
if b-a < x:
print(0)
else:
ans = (b//x)-(a//x)
if a % x == 0:
ans += 1
print(ans)
|
p03861 | s126185550 | Wrong Answer | a,b,x = map(int,input().split())
print(int(b//x-a//x)) |
p03861 | s498826013 | Wrong Answer | a,b,x = map(int, input().split())
n = b-a
if n == 0:
print(-1)
else:
print(n//x+1) |
p03861 | s400165880 | Wrong Answer | a,b,x=map(int,input().split())
count=0
count+=(b-a+1)//x
if a==b and a%x==0:
count+=1
elif a%x==0:
count+=1
elif b%x==0:
count+=1
print(count) |
p03861 | s421657491 | Wrong Answer | a,b,c=map(int,input().split())
if a==b or c>b:
print(0)
else:
if a%c==0 and b%c==0:
print(-(-(b-a)//c)+1)
elif a%c==0:
print((b-a)//c+1)
else:
print(-(-(b-a)//c)) |
p03861 | s103351355 | Wrong Answer | import math
a, b, x = map(int, input().split())
start = math.ceil(a/x)
end = b//x
print(end-start+1)
|
p03861 | s546544997 | Wrong Answer | # coding: utf-8
a, b, x = map(int, input().split(" "))
def f(n):
if n == 0:
return 0
else:
return n // x + 1
print(f(b) - f(a))
|
p03861 | s202282955 | Wrong Answer | a,b,c=map(int,input().split())
print((a-1)//c+b//c) |
p03861 | s036252360 | Wrong Answer | a,s,d=map(int,input().split())
l=-(-a)//d
u=s//d
print(u-l+1) |
p03861 | s261723589 | Wrong Answer | a,b,x = map(int,input().split())
alpha = 0
beta = 0
if a-1 == -1:
alpha = 0
else:
alpha = (a//x)+1
beta = (b//x)+1
print(beta-alpha) |
p03861 | s318192335 | Wrong Answer | a, b, x = map(int, input().split())
ans = (b-a)//x
if a % x == 0:
ans += 1
print(ans)
|
p03861 | s500867801 | Wrong Answer | def sol(x,m):
if x<=0:
return 0
else:
return x//m
a,b,n = map(int,input().split())
if a==b:
print(0)
else:
if a==0:
print(sol(b,n)+1)
else:
print(sol(b,n)-sol(a-1,n)) |
p03861 | s653361914 | Wrong Answer | a,b,x=map(int,input().split())
p=0
q=0
for i in range(a,b+1):
if i % x==0:
p=i
break
for j in range(b,a,-1):
if i % x==0:
q=j
break
print(1+(q-p)//x)
|
p03861 | s311282313 | Wrong Answer | import sys
import math
import itertools
import collections
import heapq
import re
import numpy as np
from functools import reduce
rr = lambda: sys.stdin.readline().rstrip()
rs = lambda: sys.stdin.readline().split()
ri = lambda: int(sys.stdin.readline())
rm = lambda: map(int, sys.stdin.readline().split())
rl = lambda: list(map(int, sys.stdin.readline().split()))
inf = float('inf')
mod = 10**9 + 7
a, b, x = rm()
a = math.floor(a//x * x)
b = math.floor(b//x * x)
print(b//x - a//x + 1)
|
p03861 | s024352679 | Wrong Answer | a,b,x=map(int,input().split())
if a==0:
#0以上b以下でbで割り切れる個数
if b%x==0:
ans_b = b//x +1
else:
ans_b = b//x
#0以上a未満でbで割り切れる個数
if a%x==0:
ans_a = a//x
else:
ans_a = a//x + 1
else:
ans_b = b//x
if a%x==0:
ans_a = a//x -1
else:
ans_a = a//x
print(ans_b-ans_a) |
p03861 | s233195909 | Wrong Answer | a, b, x = map(int, input().split())
if a % x == 0:
print((b - a + 1) // x + 1)
else:
print((b - a + 1) // x)
|
p03861 | s051420007 | Wrong Answer | a, b, x = map(int, input().split())
if a == b and a % x != 0:
result = 0
print(result)
exit()
elif a == b and a % x == 0:
result = 1
print(result)
exit()
else:
B = divmod(b, x)
A = divmod(a, x)
result = B[0] - A[0]
if a == 0 or (A[1] == 0 and B[1] == 0): result += 1
print(result)
|
p03861 | s681583477 | Wrong Answer | a, b, x = map(int, input().split(' '))
multiples = (b - a) // x
if a % x == 0 or b % x == 0:
multiples += 1
print(multiples)
|
p03861 | s186261436 | Wrong Answer | from decimal import *
a, b, x = map(str, input().split())
a = Decimal(a)
b = Decimal(b)
x = Decimal(x)
ans = (b - a) / x
if a % x == 0:
ans += 1
print(ans)
|
p03861 | s341289491 | Wrong Answer | a,b,x = map(int, input().split())
count = (b-a)//x
if(a%x == 0 or b%x == 0):
count += 1
print(count) |
p03861 | s081220678 | Wrong Answer | a, b, x = [int(x) for x in input().split()]
a //= x
b //= x
print(b - a + 1)
|
p03861 | s458743022 | Wrong Answer | def main():
a,b,x = map(int,input().split())
t = (b-a)//x
if a % x == 0 and b % x == 0:
print(t + 1)
else:
print(t)
if __name__ == "__main__":
main() |
p03861 | s828058183 | Wrong Answer | x = list(map(int,input().split()))
a = 0
if x[0]%x[2]==0:
b = x[0]
else:
b = ((x[0] // x[2])+1)*x[2]
c = (x[1]-b)//x[2] + 1
if x[0]==0:
c+=1
print(c) |
p03861 | s117269296 | Wrong Answer | i,j,n=map(int,input().split())
i_num=i//n
j_num=j//n
cnt=j_num-i_num
#print(cnt)
if i_num % n==0:
cnt+=1
print(int(cnt))
|
p03861 | s612187107 | Wrong Answer | x,y,z=list(map(int, input().split()))
ans=0
if (y-x)//z==0:
if x%z > y%z:
ans=ans+1
if x%z==0 or y%z==0:
print(1)
else:
print(ans)
else:
ans=((y//z)-(x//z))
if x==0:
ans=ans+1
print(ans) |
p03861 | s001906168 | Wrong Answer | import math
def main():
a, b, x = map(int, input().split())
res = (b - a)//x
if a % x == 0:
res += 1
print(res)
main() |
p03861 | s193834440 | Wrong Answer | a, b, x = map(int, input().split(' '))
print((b-a-(a%x))//x+1) |
p03861 | s339482192 | Wrong Answer | a, b, x = map(int, input().split())
d=(b-a)//x
if a%x==0 or b%x==0:
d=d+1
print(d)
else:
print(d) |
p03861 | s812012638 | Wrong Answer | import math
a,b,x = map(int,input().split())
print(b//x-math.ceil(a/x)+1) |
p03861 | s804517249 | Wrong Answer | a,b,x = map(int, input().split())
#from decimal import Decimal
#a = Decimal(str(a))
#b = Decimal(str(b))
#x = Decimal(str(x))
if a == 0:
print(b//x)
else:
print(b//x - (a-1)//x)
|
p03861 | s832195290 | Wrong Answer | a, b, x = list(map(int, input().split()))
s = a % x
d = b - a
ans = (d - s) // x + 1
if b < x:
ans = 0
print(ans) |
p03861 | s378457710 | Wrong Answer | a, b, x = map(int, input().split())
ans = 0
ans += -(-(b-a) // x)
#print(ans)
#print((b-a)/x)
if (b-a) % x == 0 and a % x == 0 and b % x == 0:
ans += 1
print(ans) |
p03861 | s017289161 | Wrong Answer | a,b,x=map(int,input().split())
aw=a//x
bw=b//x
ans=bw-aw
if b%x==0:
ans+=1
print(ans) |
p03861 | s992116455 | Wrong Answer | a,b,x = map(int,input().split())
t = 0
if b % x == 0:
t += 1
print((b - a) // x + t) |
p03861 | s609635118 | Wrong Answer | a,b,x = map(int,input().split())
a2 = a
if a % x != 0:
a2 = (x - (a % x)) + a
b2 = b - (b % x)
print((b2 - a2) / x + 1) |
p03861 | s631121810 | Wrong Answer | a, b, x = map(int, input().split())
start = a if a % x == 0 else a // x + x
if b - start >= 0:
ans = (b - start) // x + 1
else:
ans = 0
print(ans)
|
p03861 | s510577491 | Wrong Answer | import decimal
a,b,x=map(int,input().split())
a=decimal.Decimal(a)
b=decimal.Decimal(b)
print(int(b/x)-int((a-1)/x)) |
p03861 | s793857947 | Wrong Answer | x,y,d=map(int,input().split())
ans=y//d-x//d
if x==0:
ans+=1
print(ans) |
p03861 | s286188177 | Wrong Answer | # -*- coding: utf-8 -*-
"""
Created on Sat May 30 16:32:18 2020
@author: NEC-PCuser
"""
a, b, x = map(int, input().split())
a_amari = a % x
b_amari = b % x
ans = (b - a) / x
if ((a_amari + b_amari % x) == 0):
ans += 1
print(int(ans)) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.