problem_id
stringclasses
100 values
submission_id
stringlengths
10
10
status
stringclasses
2 values
code
stringlengths
6
806
p03861
s611050257
Accepted
a,b,x=map(int,input().split()) print(b//x-(a-1)//x)
p03861
s639849454
Accepted
a, b, c = map(int, input().split()) print((b // c) - (a - 1) // c)
p03861
s357550391
Accepted
a,b,x=map(int,input().split()) a-=1 c=(a-a%x)//x d=(b-b%x)//x print(d-c)
p03861
s530580154
Accepted
def f(n): if x == -1: return 0 else: return n//x+1 a,b,x = map(int,input().split()) print(f(b)-f(a-1))
p03861
s005795735
Accepted
a,b,x = map(int,input().split()) B = b//x A = (a-1)//x print(B-A)
p03861
s746291459
Accepted
a, b, x = map(int, input().split()) print(b//x - (a-1)//x)
p03861
s703584546
Accepted
a, b, x = [int(i) for i in input().split()] print(b // x - (a-1) // x)
p03861
s782949484
Accepted
a,b,x=map(int,input().split());print(b//x-(a-1)//x)
p03861
s120255343
Accepted
a,b,x = map(int,input().split()) print(b//x -(a-1)//x)
p03861
s464412551
Accepted
a, b, x = map(int, input().split()) ans = b//x - (a-1)//x print(ans)
p03861
s989175071
Accepted
#!/usr/bin/env python3 # -*- coding: utf-8 -*- def main(): A, B, X = map(int, input().split()) print(B // X - (A - 1) // X) if __name__ == "__main__": main()
p03861
s090672909
Accepted
a, b, x = [int(x) for x in input().split()] cnt_a = (a-1) // x cnt_b = b // x print(cnt_b-cnt_a)
p03861
s264958535
Accepted
a,b,x=map(int,input().split()) print(b//x-(a-1)//x)
p03861
s923383832
Accepted
def generator(x, a): # xの倍数でaより大きいもののうちの最小値 if x >= a: y = x else: tmp = a // x + 1 if a % x == 0: tmp -= 1 y = x * tmp return y def main(): a, b, x = map(int, input().split()) minimum = generator(x, a) if minimum > b: count = 0 else: count = (b - minimum) // x + 1 if a == 0: count += 1 print(count) if __name__ == '__main__': main()
p03861
s816435205
Accepted
a,b,x = map(int, input().split()) a_div=0 b_div = b//x if a!=0: a_div = (a-1)//x count = b_div-a_div else: count = b_div-a_div+1 print(count)
p03861
s766175244
Accepted
a,b,x=map(int,input().split()) c=a-1 max=b//x+1 min=c//x+1 if c==-1: min=0 else: pass print(max-min)
p03861
s348403008
Accepted
a,b,x=map(int,input().split()) if a==0: print(b//x+1) else: print(b//x-(a-1)//x)
p03861
s867981123
Accepted
a, b, x = map(int, input().split()) if a % x == 0: b -= b % x print((b - a)//x + 1) else: a -= a % x b -= b % x print((b - a)//x)
p03861
s229365817
Accepted
a,b,x=map(int,input().split()) b1=b//x a1=(a-1)//x print(b1-a1)
p03861
s193083989
Accepted
x, y, z = map(int,input().split()) if x%z != 0: print(y//z - x//z) else: print(y//z - x//z +1)
p03861
s601888172
Accepted
a, b, x = map(int,input().split()) if a%x == 0: print(b//x-a//x+1) else: print(b//x-a//x)
p03861
s092961103
Accepted
a, b, x = map(int, input().split()) m1 = a % x m2 = b % x if a == b: if a % x == 0: print(1) else: print(0) exit() if m1 != 0: a = (a//x)*x + x if m2 != 0: b = (b//x)*x print((b//x-a//x)+1)
p03861
s237606907
Accepted
def solve(): a, b, x = map(int,input().split()) print(b // x + 1 - ((a-1) // x + 1)) if __name__ == '__main__': solve()
p03861
s947041119
Accepted
a,b,x = map(int, input().split()) if a%x == 0: print(b//x-a//x+1) else: print(b//x-a//x)
p03861
s697618859
Accepted
# import numpy as np # import math import sys input = sys.stdin.readline def main(): a,b,x = map(int,input().split()) res = b // x - (a - 1) // x print(res) main()
p03861
s032484678
Accepted
def solve(a, b, x): def f(n): if n == -1: return 0 return n // x + 1 print(f(b) - f(a - 1)) T = list(map(int, input().split())) solve(T[0], T[1], T[2])
p03861
s297989451
Accepted
a, b, x = map( int, input().split()) print( b//x - (a-1)//x)
p03861
s762976090
Accepted
# from decimal import Decimal a, b, c = map(int, input().split()) print(b//c - a//c if a%c != 0 else b//c - a//c +1)
p03861
s977992456
Accepted
a, b, x = map(int, input().split()) if a == 0: print(b // x + 1) else: A = (a - 1) // x B = b // x print(B - A)
p03861
s465645420
Accepted
a,b,x = map(int,input().split()) ans = b//x -(a-1)//x print(ans)
p03861
s740979811
Accepted
a,b,x = map(int,input().split()) up = b//x*x if a%x == 0: down = a else: down = (a//x+1)*x ans = (up-down)//x+1 print(ans)
p03861
s483350723
Accepted
a, b, x = map(int, input().split()) print(b//x - (a-1)//x)
p03861
s134492498
Accepted
a, b, x = map(int, input().split()) fa = max(a - 1, 0) // x fb = b // x ans = fb - fa if a != 0 else fb - fa + 1 print(ans)
p03861
s437369148
Accepted
a,b,x = (int(T) for T in input().split()) print((b//x)-(a//x)+(a%x==0))
p03861
s852625399
Accepted
a,b,x = map(int,input().split()) if a%x!=0: temp = a%x a += x-temp if a>b: print(0) elif a==b: print(1) else: temp = (b-a)//x print(temp+1)
p03861
s721401810
Accepted
a,b,x = map(int, input().split()) s = (a-1)//x if a == 0: s = -1 p = b//x print(p - s)
p03861
s458341255
Accepted
a, b, x = map(int, input().split()) aa = b//x bb = a//x if a%x != 0: print (aa-bb) else: print (aa-bb+1)
p03861
s018452710
Accepted
a, b, x = list(map(int, input().split())) print(b//x-(a-1)//x)
p03861
s152683334
Accepted
a, b, x = map(int, input().split()) # a = p*x + r, b = q*x + s p = a // x r = a % x q = b // x s = b % x res = q - p if r == 0: res += 1 print(res)
p03861
s987704710
Accepted
a,b,x=map(int,input().split()) start=((a-1)//x+1)*x if start>b: print(0) else: print((b-start)//x+1)
p03861
s202990680
Accepted
a, b, x = map(int, input().split()) if a%x==0: ax = a//x-1 else: ax = a//x bx = b//x print(bx-ax)
p03861
s026946917
Accepted
a,b,x = list(map(int,input().split())) a1 = a//x if a%x else a//x-1 a2 = b//x print(a2-a1)
p03861
s816954172
Accepted
n, k, x = map(int,input().split()) if n == 0: print(k//x + 1) else: if n%x == 0: print(k//x - n//x + 1) else: print(k//x - n//x)
p03861
s138677382
Accepted
a, b, x = map(int, input().split()) def solve(a,b,x): ans = b//x - (a-1)//x # print(ans) return ans print(solve(a,b,x))
p03861
s338781079
Accepted
a, b, x = map(int, input().split()) print(b // x - (a - 1) // x)
p03861
s974448933
Accepted
a,b,x=[int(i) for i in input().split()] def get_mod_num(limit,x): if limit==-1: return 0 return limit//x+1 print(get_mod_num(b,x)-get_mod_num(a-1,x))
p03861
s328672442
Accepted
#k = int(input()) #s = input() #a, b = map(int, input().split()) #s, t = map(str, input().split()) #l = list(map(int, input().split())) #l = [list(map(int,input().split())) for i in range(n)] a,b,x = map(int, input().split()) def function(n,x): if (n>=0): return n//x+1 else: return 0 ans = function(b,x) - function(a-1,x) print(ans)
p03861
s887237968
Accepted
a,b,x=map(int, input().split()) print(b//x-(a-1)//x)
p03861
s627429327
Accepted
a,b,x=map(int,input().split()) cnt=0 #for i in range(a,b+1): # if i%x==0: cnt+=1 #print(cnt) cnt1=b//x cnt2=(a-1)//x print(cnt1-cnt2)
p03861
s124214633
Accepted
a, b, x = map(int, input().split()) print(b//x - (a-1)//x)
p03861
s872119849
Accepted
a, b, x = map(int, input().split()) mod = a % x if mod == 0: start = a-(x-1) else: start = a-(mod-1) print((b-start+1)//x)
p03861
s485451907
Accepted
a, b, x = list(map(int, input().split())) if a % x == 0: print(b // x - a // x + 1) else: print(b // x - a // x)
p03861
s684641457
Accepted
a,b,x = map(int,input().split()) print(max(b//x-(a-1)//x,0))
p03861
s132220841
Accepted
a, b, x = map(int, input().split()) ans = b//x - (a-1)//x print(ans)
p03861
s861183271
Accepted
a, b ,x = map(int, input().split()) ans = 0 n_a = a//x n_b = b//x if a%x == 0: ans+=1 ans += n_b - n_a print(ans)
p03861
s203116211
Accepted
a,b,x=map(int,input().split()) bb=b//x aa=a//x ans=bb-aa if a%x==0: ans+=1 print(ans)
p03861
s912221426
Accepted
a,b,x = map(int,input().split()) def count(c): if c==0: return 0 return c//x print(count(b)-count(a-1))
p03861
s537872554
Accepted
a, b, x = map(int, input().split()) if a != 0: print(b // x - (a - 1) // x) else: print(b // x + 1)
p03861
s257850263
Accepted
a, b, x = map(int, input().split()) print(b // x - (a -1) // x)
p03861
s424575819
Accepted
def main(): a, b, x = map(int, input().split()) if a == 0: left = 0 else: left = (a-1)//x + 1 if b == 0: right = 1 else: right = b//x + 1 print(right - left) if __name__ == "__main__": main()
p03861
s759449688
Accepted
a,b,x = list(map(int, input().split())) print(b//x - (a-1)//x)
p03861
s518741938
Accepted
a, b, x = map(int, input().split()) cnta = max((a - 1) // x + 1, 0) cntb = b // x + 1 print(cntb - cnta)
p03861
s173297645
Accepted
a, b, x = map(int, input().split()) print(b//x-(a-1)//x)
p03861
s082144826
Accepted
a,b,x=map(int,input().split()) print(b//x-(a-1)//x)
p03861
s243856716
Accepted
a,b,x = map(int, input().split()) print(b//x-(a-1)//x)
p03861
s860981159
Accepted
a, b, x = map(int, input().split()) print(b // x - (a - 1) // x)
p03861
s105160691
Accepted
a, b, x = map(int, input().split()) B = b//x A = (a-1)//x print(B-A)
p03861
s738437768
Accepted
a, b, x = map(int, input().split()) if a%x == 0: ans = (b-a)//x+1 else: a += x-a%x if b >= a: ans = (b-a)//x+1 else: ans = 0 print(ans)
p03861
s956089078
Accepted
a,b,x = map(int,input().split()) print(b//x-(a-1)//x)
p03861
s921936081
Accepted
a, b, x = map(int, input().split()) print(b // x - a // x + (1 if a % x == 0 else 0))
p03861
s741144034
Accepted
#abc064 b a,b,x=map(int,input().split()) ans=b//x-(a-1)//x print(ans)
p03861
s264600348
Accepted
a, b, x = [int(i) for i in input().split()] print((b//x+1) - ((a-1)//x+1 if a >= 0 else 0))
p03861
s752828033
Accepted
a,b,x=map(int,input().split()) A=a//x B=b//x ans=B-A if a%x==0: ans+=1 print(ans)
p03861
s780805298
Accepted
a,b,c=map(int,input().split()) n=a//c m=b//c o=0 if a%c==0: o=1 print(m-n+o)
p03861
s364470694
Accepted
a, b, x = map(int, input().split()) aa = (a-1) // x bb = b // x ans = bb-max(aa, 0) if a == 0: ans += 1 print(ans)
p03861
s898227696
Accepted
a,b,x=map(int,input().split()) ans = 0 if a % x == 0: ans += 1 b //= x a //= x ans += b - a print(ans)
p03861
s335124839
Accepted
a, b, x = map(int, input().split()) bans = b//x aans = a//x if a%x == 0: aans -= 1 print(bans - aans)
p03861
s071034883
Accepted
def cin(): return map(int,input().split()) def cino(test=False): if not test: return int(input()) else: return input() def cina(): return list(map(int,input().split())) def ssplit(): return list(input().split()) import math a,b,c = cin() print(b//c - a//c+(a%c==0))
p03861
s727631025
Accepted
a, b, x = map(int, input().split()) def f (n): if n == -1: return 0 else: return n // x + 1 print(f(b) - f(a-1))
p03861
s023687249
Accepted
a,b,x=map(int,input().split());print(b//x-(a-1)//x)
p03861
s688132014
Accepted
import sys import math import bisect def query(n, x): return n // x + 1 def main(): a, b, x = map(int, input().split()) ans = query(b, x) if a > 0: ans -= query(a - 1, x) print(ans) if __name__ == "__main__": main()
p03861
s878881469
Accepted
s = input().split() a = int(s[0]) b = int(s[1]) x = int(s[2]) def bet_ween(p, q): if p < 0: return 0 else: return (p // q) + 1 fa = bet_ween(a-1, x) fb = bet_ween(b, x) answer = fb - fa print(int(answer))
p03861
s976507090
Accepted
import sys a, b, x = map(int, input().split()) cnt = 0 if a == 0: cnt = b // x + 1 else: cnt = b // x - (a - 1) // x print("{}".format(cnt))
p03861
s863764510
Accepted
def main(): A, B, X = map(int, input().split()) ans = B // X - (A - 1) // X print(ans) if __name__ == '__main__': main()
p03861
s318479044
Accepted
a,b,x=map(int,input().split()) print(b//x-(a-1)//x)
p03861
s402651115
Accepted
import sys input = sys.stdin.readline #n = int(input()) #l = list(map(int, input().split())) ''' a=[] b=[] for i in range(): A, B = map(int, input().split()) a.append(A) b.append(B)''' a,b,x=map(int, input().split()) c=a//x cc=b//x if a%x==0: cc+=1 print(cc-c)
p03861
s359157919
Accepted
a, b, x = map(int, input().split()) ans = int(b//x) - int(a//x) if a%x ==0: ans += 1 print(ans)
p03861
s279831060
Accepted
a, b, x = map(int, input().split()) a = (a - 1) // x b = b // x print(b - a)
p03861
s579923084
Accepted
a,b,x=map(int,input().split()) print(b//x-(a+x-1)//x+1)
p03861
s707203322
Accepted
a, b, x = map(int, input().split()) ans = (b // x) - (a // x) if a % x == 0: ans +=1 print(ans)
p03861
s749244597
Accepted
a, b, x = map(int, input().split()) if a%x == 0: print(b//x-a//x+1) else: print(b//x-a//x)
p03861
s076287891
Accepted
a,b,x=map(int,input().split()) print(max(b//x-(a-1)//x,0))
p03861
s298890064
Accepted
import sys readline = sys.stdin.buffer.readline sys.setrecursionlimit(10 ** 8) INF = float('inf') MOD = 10 ** 9 + 7 def main(): a, b, x = map(int, readline().split()) ans = b//x - (a-1)//x print(ans) if __name__ == '__main__': main()
p03861
s581071453
Accepted
a, b, x = [int(i) for i in input().split()] def ret(n): if n>=0: return n//x+1 else: return 0 print(ret(b)-ret(a-1))
p03861
s517992754
Accepted
a,b,x=map(int,input().split()) temp1=(b//x)+1 if 0<=a-1: temp2=((a-1)//x)+1 else: temp2=0 print(temp1-temp2)
p03861
s722755815
Accepted
a, b, x = map(int, input().split()) print(b // x - (a - 1) // x)
p03861
s022261927
Accepted
a,b,x = map(int, input().split()) ans = b//x - (a-1)//x print(ans)
p03861
s745807617
Accepted
# from pprint import pprint # import math # import collections # n = int(input()) a, b, x = map(int, input().split(' ')) # a = list(map(int, input().split(' '))) _a = a // x + 1 _b = b // x + 1 if a % x == 0: _c = 1 else: _c = 0 ans = _b - _a + _c # print(_a, _b, _c, ans) print(ans)
p03861
s592216723
Accepted
a,b,x=list(map(int,input().split())) print(b//x-(a-1)//x)
p03861
s039114949
Accepted
import sys def input(): return sys.stdin.readline().strip() def resolve(): a,b,x=map(int, input().split()) if a!=0: amade=(a-1)//x bmade=b//x print(bmade-amade) else: print(b//x+1) resolve()