problem_id stringclasses 100
values | submission_id stringlengths 10 10 | status stringclasses 2
values | code stringlengths 6 806 |
|---|---|---|---|
p03861 | s643315141 | Wrong Answer | a, b, x = map(int, input().split())
if b >= 10**18:
b -= x
ans = (b - a) // x + 1
if a == b:
ans = 0
print(ans) |
p03861 | s883617485 | Wrong Answer | from sys import stdin
import math
if __name__ == "__main__":
_in = [_.rstrip() for _ in stdin.readlines()]
a,b,x = list(map(int,_in[0].split(' '))) # type:list(int)
# vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
cnt = math.floor(b/x)-math.ceil(a/x)+1
# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
print(cnt)
|
p03861 | s715793516 | Wrong Answer | a, b, x = map(int, input().split())
i = a// x
j = b// x
p = i
q = j
while i* x < a:
i+= 1
p = i* x
while j* x < b:
j+= 1
q = (j- 1)* x
ans = int((q- p)// x)+ 1
if(ans<= 0):
print(0)
else:
print(ans) |
p03861 | s940480053 | Wrong Answer | a, b, x = map( int, input().split())
print( b//x - a//x + 1) |
p03861 | s828701359 | Wrong Answer | a, b, x = map(int, input().split())
count = 0
if a % x != 0 and b % x != 0:
print((b-a)//x)
elif a == 0 and b == 0:
if x == 0:
print(1)
else:
print(0)
else:
print((b-a)//x + 1) |
p03861 | s826954718 | Wrong Answer | a,b,x=map(int, input().split())
m=(b-a)//x
if b//x==0 and a//x==0:
print(int(m+1))
else:
print(int(m)) |
p03861 | s481929463 | Wrong Answer | a,b,c=input().split()
a=int(a)
b=int(b)
c=int(c)
if a%c==0:
print(int(b/c)-int(a/c)+1)
else:
print(int(b/c)-int(a/c)) |
p03861 | s889535013 | Wrong Answer | a,b,x=map(int,input().split())
if a%x!=0:
a+=x-a%x
if a==b and a==0:
print(1)
elif a>=b:
print(0)
else:
print(b//x-a//x+1) |
p03861 | s488940943 | Wrong Answer | a,b,x = map(int,input().split())
if a ==0:
print(b//x+1)
else:
print(b//x-a//x) |
p03861 | s229285645 | Wrong Answer | a,b,c=input().split()
a=int(a)
b=int(b)
c=int(c)
print(int(b/(1000000000*c)-a/(1000000000*c)*100000)) |
p03861 | s654443245 | Wrong Answer | a,b,x=map(int,input().split())
p=b//x-a//x
if a//x==0:
p+=1
print(p) |
p03861 | s124457900 | Wrong Answer | import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import permutations, combinations, product
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
MOD = 10 ** 9 + 7
a, b, x = MAP()
print(b//x-(a-1)//2)
|
p03861 | s064468204 | Wrong Answer | def input_int():
return(int(input()))
def input_int_list():
return(list(map(int,input().split())))
def input_int_map():
return(map(int,input().split()))
def run():
a, b, x = input_int_map()
diff = (b - a) // x
if a % x == 0:
diff += 1
print(diff)
run()
|
p03861 | s504458306 | Wrong Answer | a,b,x = (int(T) for T in input().split())
print((b//x)-(a//x)) |
p03861 | s540780197 | Wrong Answer | # coding: utf-8
a, b, x = map(int, input().split(" "))
n = b - a
if a % x == 0 or b % x == 0:
print(n // x + 1)
else:
print(n // x)
|
p03861 | s131637103 | Wrong Answer | a, b, x = map(int, input().split())
ans = 0
ans += (b-a) // x
if a % x == 0 and b % x == 0:
ans += 1
print(ans) |
p03861 | s683310451 | Wrong Answer | from decimal import Decimal
a, b, c = map(Decimal, input().split())
print(a//c - b//c if a%c != 0 else a//c - b//c +1) |
p03861 | s154240523 | Wrong Answer | a, b, x = map(int, input().split())
count = 0
print((b-a)//x+1) |
p03861 | s981368004 | Wrong Answer | a,b,x=map(int,input().split())
print(b//x-max(a-1,0)//x) |
p03861 | s875573250 | Wrong Answer | a,b,x = map(int,input().split())
t = (b-a)//x
if a % x == 0 or b % x == 0:
print (t + 1)
else:
print (t) |
p03861 | s653919928 | Wrong Answer | a, b, x = list(map(int, input().split()))
s = a % x
d = b - a
ans = (d - s) // x + 1
print(ans) |
p03861 | s890723299 | Wrong Answer | a, b, x = map(int, input().split())
if x == 1:
print(b - a + 1)
exit()
if a == b:
print(0)
exit()
if a == 0:
print(b // x + 1)
exit()
print(b // x - (a-1) // x) |
p03861 | s064965376 | Wrong Answer | a,b,x=map(int,input().split())
print(b//x-a//x) |
p03861 | s412449772 | Wrong Answer | a, b, x = map(int, input().split())
if a%x == 0:
print((b - a)//x + 1)
else:
print((b - a)//x) |
p03861 | s785325454 | Wrong Answer | a, b, x = map(int, input().split())
print((b-a+1)//x) |
p03861 | s963214581 | Wrong Answer | a,b,x=map(int,input().split())
#a<=y<=bでy%x=0を満たすyの個数を求める
def between(a,b,x):
if b<x and b!=0:
print(0)
return
elif b<x and b==0:
print(1)
return
elif a<=x:
num=x
elif x<a:
num=a
while num%x!=0:
num+=1
print((b-num)//x+1)
between(a,b,x) |
p03861 | s640365721 | 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)
elif a==1:
print(sol(b,n))
else:
print(sol(b,n)-sol(a-1,n)) |
p03861 | s050397782 | Wrong Answer | a,b,x = map(int,input().split())
count=0
if a%x==0 or a==0:
print(int(b/x)-int(a/x)+1)
else:
print(int(b/x)-int(a/x))
|
p03861 | s372445807 | Wrong Answer | a,b,x = list(map(int, input().split()))
if a%x == 0:
print(b//x-a//x+1)
elif b%x == 0:
print(b//x-a//x+1)
else:
print(b//x-a//x)
|
p03861 | s471788255 | Wrong Answer | a,b,x=map(int,input().split())
cnt=0
c=a//x
d=b//x
print(int(d-c)) |
p03861 | s964373897 | Wrong Answer | #!/usr/bin/env python
a, b, x = map(int, input().split())
if a == b:
print(0)
exit()
if a%x == 0 and b%x == 0:
ans = b//x - a//x + 1
print(ans)
exit()
if a%x != 0 and b%x != 0:
ans = b//x - a//x
print(ans)
exit()
ans = b//x - a//x + 1
print(ans)
|
p03861 | s662782981 | 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(cnt) |
p03861 | s466815960 | Wrong Answer | import math
import sys
import os
from operator import mul
sys.setrecursionlimit(10**7)
def _S(): return sys.stdin.readline().rstrip()
def I(): return int(_S())
def LS(): return list(_S().split())
def LI(): return list(map(int,LS()))
if os.getenv("LOCAL"):
inputFile = basename_without_ext = os.path.splitext(os.path.basename(__file__))[0]+'.txt'
sys.stdin = open(inputFile, "r")
INF = float("inf")
a,b,x = LI()
ans = 0
if a > 0:
a -= 1
ans += 1
ans += b//x - a//x
print(ans) |
p03861 | s732946576 | Wrong Answer | a,b,x = map(int,input().split())
tmp = b//x - a//x
if a//x != 0:
tmp += 1
print(tmp)
|
p03861 | s235662246 | Wrong Answer | a, b, x = map(int, input().split())
cnt = 0
print(b//x - a//x) |
p03861 | s724108915 | Wrong Answer | import math
a, b, x = map(int, input().split())
if (b // x) - (a // x)== 0:
print(0)
else:
print((((b - a)//x) + 1)) |
p03861 | s521451308 | Wrong Answer | # coding: utf-8
a, b, x = map(int, input().split(" "))
n = b - a
if a % x == 0:
print(n // x + 1)
else:
print(n // x)
|
p03861 | s488854730 | Wrong Answer | a,b,c = map(int, input().split())
if a < c:
r = 1
else:
r = a % c == 0 or b % c == 0 if 1 else 0
ans = (b-a)//c + r
print(ans)
|
p03861 | s824650936 | Wrong Answer | a,b,x=map(int,input().split())
keep=0
shita=a//x
ue=b//x
if a%2==1:
print(ue-shita)
else:
print(ue-shita+1) |
p03861 | s979044953 | 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 | s729210772 | Wrong Answer | a, b, x = map(int, input().split())
if (a/x).is_integer() and (b/x).is_integer():
print(b//x-a//x+1)
else:
print(b//x-a//x)
|
p03861 | s221784794 | Wrong Answer | # cook your dish here
li=list(map(int,input().split()))
if li[0]==li[1]:
k=int(li[0]//li[2])
if k*li[2]==li[0]:
print(1)
else:
print(0)
elif li[0]<li[2]:
if li[0]==0:
print(li[1]//li[2]+1)
else:
print(li[1]//li[2])
else:
print((li[1]//li[2])-(li[0]//li[2])+1) |
p03861 | s427930828 | Wrong Answer | a,b,x=map(int,input().split())
print(b//x-max((a-1)//x,0)) |
p03861 | s443728469 | 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))
print(int(b/x) - int((a-1)/x))
|
p03861 | s361958606 | Wrong Answer | a, b, x = map(int, input().split())
print(b // x - a // x) |
p03861 | s751038095 | Wrong Answer | a,b,x=map(int,input().split())
if a<=b<x:
if a==0:
print(1)
else:
print(0)
else:
t=(b-a)//x
if a%x==0:
t=t+1
elif b%x==0:
t=t+1
elif a%x==0 and b%x==0:
t=t-1
print(t)
|
p03861 | s374059522 | Wrong Answer | a,b,x=map(int,input().split())
print(a,b,x)
aw=a//x
bw=b//x
ans=bw-aw
if b%x==0:
ans+=1
print(ans) |
p03861 | s431323772 | Wrong Answer | a,b,x = map(int, input().split())
count = (b-a)//x
if a%x == 0:
count += 1
print(count) |
p03861 | s072774650 | Wrong Answer | a,b,x = map(int,input().split())
if a % x == 0:
print((b - a) // x + 1)
else:
print((b - a) // x) |
p03861 | s095540491 | Wrong Answer | a, b, x = map(int, input().split())
print((b // x) - (a // x)) |
p03861 | s597553851 | Wrong Answer | a,b,x = map(int,input().split())
if a % x == 0 and b % x == 0 and a > 0 and b > 0:
print((b-a+1)//x + 1)
else:
print((b-a+1)//x) |
p03861 | s371982442 | Wrong Answer | a,b,x = map(int,input().split())
if a > x or b < x:
print("0")
else:
print(b//x-a//x+1) |
p03861 | s889799822 | Wrong Answer | a,b,x=map(int,input().split())
p=a+(x-(a%x))
q=b-(b%x)
ans =1+(q-p)//x if p+q!=0 else 0
print(ans)
|
p03861 | s999917921 | Wrong Answer | import math
a,b,x = map(int, input().split())
A=math.ceil(a/x)
B=b//x
print(0 if B-A==0 else B-A+1)
|
p03861 | s005811873 | Wrong Answer | a,b,x = map(int,input().split())
ans = (b-a)//x
if b != 0:
if b%x == 0:
ans += 1
print(ans) |
p03861 | s611729742 | Wrong Answer | a,b,x=map(int,input().split())
ans=0
ans=(b-a+1)//x
if ans*(x+1)<=b:
ans+=1
print(ans)
|
p03861 | s851717070 | Wrong Answer | import math
(a,b,x)=map(float, input().split(" "))
print(math.floor(b/x)-math.ceil(a/x)+1) |
p03861 | s822494417 | Wrong Answer | a,b,x = map(int,input().split())
if a%x == 0:
print(int((b-a)//x)+1)
else:
print(int((b-a)//x)) |
p03861 | s830950737 | Wrong Answer | import sys
readline = sys.stdin.buffer.readline
a,b,x = map(int,readline().split())
import math
low = math.ceil(a/x)
high = b//x
print(high-low+1) |
p03861 | s123662020 | Wrong Answer | a, b, x = map(int, input().split())
a = a + a%x
b = b - b%x
print((b-a)//x+1) |
p03861 | s110897374 | Wrong Answer | a,b,x = map(int,input().split())
a += (x - a%x) if a%x else 0
b -= b%x
print(a,b)
ans = b//x - a//x + 1
print(ans)
|
p03861 | s460061623 | Wrong Answer | a,b,x=map(int,input().split())
if a==0 :
a=1
bb=b//x
aa=a-1
aa//=x
print (bb-aa) |
p03861 | s789910215 | Wrong Answer | import math
a, b, x = map(int,input().split())
if a % x != 0:
print(b//x - a//x + 2)
else:
print(b//x - a//x + 1) |
p03861 | s198549105 | Wrong Answer | import math
a,b,x=map(int, input().split())
A=math.ceil(a/x)
B=math.floor(b/x)
print(A-B+1) |
p03861 | s175119036 | Wrong Answer | a, b, x = map(int, input().split())
ans = 0
if a % x == 0:
ans = (b - a) // x + 1
else:
ans = (b - a) // x
print(ans)
|
p03861 | s055770463 | Wrong Answer | a, b, x = map(int, input().split(' '))
multiples = (b - a) // x
if a % x == 0 or b % x == 0:
multiples += 1
if a == b == 0:
print(0)
else:
print(multiples)
|
p03861 | s914812082 | Wrong Answer | a,b,x=map(int, input().split())
#a<=n<=b
if a%x==0:
first=a//x
else:
first=(a//x)*x+x
if first>b:
print(0)
else:
print((b-first)//x+1)
|
p03861 | s551764685 | Wrong Answer | import math
a,b,x = map(int,input().split())
print(math.floor(b/x)-math.floor(a/x)) |
p03861 | s076882550 | Wrong Answer | a,b,x=map(int,input().split())
print(int((b-a)/x)) |
p03861 | s737965293 | Wrong Answer | a, b, x = map(int, input().split())
ans = 0
start = a
stop = b
c = 0
d = 0
for i in range(a, b):
if i % x == 0:
start = i
c = start // x
break
for i in range(b, a, -1):
if i % x == 0:
stop = i
d = stop // x
break
print(d - c + 1) |
p03861 | s818093031 | Wrong Answer | a, b, x = map(int, input().split())
print(b//x - a//x +1) |
p03861 | s442382215 | Wrong Answer | import math # noqa
import bisect # noqa
import queue # noqa
if __name__ == '__main__':
a, b, x = map(int, input().split())
L = b - a + 1
if L % x == 0:
print(L // x)
else:
if a % x == 0 or b % x == 0:
print(L // x + 1)
else:
print(L // x)
|
p03861 | s414575662 | Wrong Answer | a, b, x = map(int, input().split())
print(b//x-a//x+1 if (b-a)!=0 else 0) |
p03861 | s166405139 | Wrong Answer | a,b,x=map(int,input().split())
cnt=0
while b-a<x:
b-=x
cnt+=1
print(cnt) |
p03861 | s138470656 | 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, readline().split())
'''
num = b - a + 1
arr = np.linspace(a, b, num)
div = np.where(arr % x == 0)
ans = div[0][0]
'''
if (a == 0):
ans = b // x - a // x + 1
else:
ans = b // x - a // x
print(ans)
|
p03861 | s501032466 | Wrong Answer | a, b, x = map(int, input().split(" "))
print((b - a + 1)//x) |
p03861 | s634589586 | Wrong Answer | a,b,x=map(int,input().split())
i,j=a//x,b//x
print(j-i+1) |
p03861 | s411865760 | Wrong Answer | data = [int(i) for i in input().split(" ")]
total = 0
if data[0] != data[1]:
for i in range(data[0],data[1]+1):
if i % data[2] == 0:
total += 1
print(total) |
p03861 | s955979330 | Wrong Answer | a,b,c = map(int, input().split())
r = a % c == 0 or b % c == 0 if 1 else 0
ans = b//c-a//c + r
print(ans)
|
p03861 | s453999579 | Wrong Answer | a, b, x = map(int, input().split())
if (a!= 0 and a % x == 0) or (b!= 0 and b % x == 0) ==0:
print((b-a)//x + 1)
else:
print((b-a)//x) |
p03861 | s467147502 | Wrong Answer | import math
a, b, x = map(int,input().split())
print(b//x - math.ceil(a/x) + 1) |
p03861 | s390935858 | 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:
res+=1
print(res)
|
p03861 | s572956019 | Wrong Answer | a, b, x = map(int, input().split())
div_a = a // x
div_b = b // x
if a == 0:
div_b += 1
print(div_b - div_a)
|
p03861 | s157424815 | Wrong Answer | a, b, x = map(int,input().split())
r = 0
#b = max(a, (b // x) * x)
b_a = b - a
r = b_a // x
if a % x == 0:
r += 1
print(int(r)) |
p03861 | s606745544 | Wrong Answer | a, b, x = map(int, input().split())
aa = (a-1) // 3 + 1
bb = b // 3
print(bb - aa + 1) |
p03861 | s228136408 | Wrong Answer | a,b,x = map(int, input().split())
a += a % x
b -= b % x
print(1 + (b - a) // x) |
p03861 | s826631966 | 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, readline().split())
'''
num = b - a + 1
arr = np.linspace(a, b, num)
div = np.where(arr % x == 0)
ans = div[0][0]
'''
if (b == 0):
ans = 0
elif (a == 0) and (b != 0):
ans = b // x
else:
ans = (b // x) - (a // x)
if (a % x == 0):
ans += 1
print(ans)
|
p03861 | s033092557 | Wrong Answer | def input_int():
return(int(input()))
def input_int_list():
return(list(map(int,input().split())))
def input_int_map():
return(map(int,input().split()))
def run():
a, b, x = input_int_map()
start = a // x
end = b // x
diff = end - start
if diff == 0:
print(0)
return
print(diff + 1)
run()
|
p03861 | s845569031 | Wrong Answer | a, b, x = map(int, input().split())
answ = (b - a) // x if a % x != 0 else (b - a) // x + 1
print(answ)
|
p03861 | s258422406 | Wrong Answer | a, b, x = map(int, input().split())
ans = (b-a)//x
if a%x == 0:
ans += 1
print(ans) |
p03861 | s249065710 | Wrong Answer | a,b,x=map(int,input().split())
fb=b//x+1
if a==0:
fa=0
else:
fa=a//x+1
print(fb-fa) |
p03861 | s712514838 | Wrong Answer | a, b, x = map(int, input().split())
def count(a, b, x):
temp = b / x
if a == 0:
return b
else:
return b - ((a-1) / x)
print(count(a, b, x)) |
p03861 | s361905608 | Wrong Answer | def solve(a, b, x):
a = max(a, x) if a != 0 else a
if a % x != 0:
a += a % x
if b % x != 0:
b -= b % x
if a > b:
print(0)
else:
print((b - a - 1) // x + 2)
T = list(map(int, input().split()))
solve(T[0], T[1], T[2])
|
p03861 | s687095467 | Wrong Answer | A, B, x = map(int,input().split())
b_d = B//x+1
a_d = A//x
if A!=0:
a_d+=1
print(b_d - a_d) |
p03861 | s926757811 | Wrong Answer | a, b, x = map(int, input().split())
if (1 <= b // x - a // x) or (a==b and a % x == 0):
res = b // x - a // x + 1
print(res)
else:
print(0) |
p03861 | s509478227 | Wrong Answer | import sys
read = sys.stdin.read
readlines = sys.stdin.readlines
def main():
a, b, x = map(int, input().split())
r = (b - a) // x
if a % x == 0:
r += 1
print(r)
if __name__ == '__main__':
main()
|
p03861 | s013249225 | Wrong Answer | (a,b,x)=map(float, input().split(" "))
print(int((b//x)-((a-1)//x))) |
p03861 | s465354366 | Wrong Answer | a,b,x=map(int,input().split());b=(b-a)+1
print([b//x+1,b//x][x%2!=0] if b>x else 0) |
p03861 | s003331432 | Wrong Answer | a,b,x=map(int,input().split());b=(b-a)+1
print(b//x-(a-1)//x) |
p03861 | s787491682 | Wrong Answer | def resolve():
a, b, x = map(int, input().split())
c = b - a
ans = c // x
if a % x == 0 or b % x == 0:
ans += 1
print(ans)
resolve() |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.