problem_id
stringclasses
100 values
submission_id
stringlengths
10
10
status
stringclasses
2 values
code
stringlengths
6
806
p03861
s836295617
Accepted
import sys read = sys.stdin.buffer.read readline = sys.stdin.buffer.readline readlines = sys.stdin.buffer.readlines sys.setrecursionlimit(10 ** 7) a, b, x = map(int, read().split()) print(b // x - (a - 1) // x)
p03861
s134854437
Accepted
a, b, x = map(int, input().split()) if a%x != 0: aa = a + (x - a % x) else: aa = a ans = (b - aa) // x + 1 print(ans)
p03861
s822659471
Accepted
import sys numbers = sys.stdin.readline().split(' ') a = int(numbers[0]) b = int(numbers[1]) c = int(numbers[2]) if a > 0: print(b//c - (a-1)//c) else: print(b//c+1)
p03861
s072812187
Accepted
a, b, x = map(int, input().split()) print(b // x - (a + x - 1) // x + 1)
p03861
s451342342
Accepted
a, b, x = map(int, input().split()) print(b//x-(a-1)//x)
p03861
s577328317
Accepted
a, b, x = map(int, input().split()) # 0~a-1でいく぀あるか if a == 0: count_a = 0 else: count_a = (a-1) // x + 1 # 0~bでいく぀あるか count_b = b // x + 1 print(count_b - count_a)
p03861
s824610394
Accepted
a,b,x = map(int, input().split()) print(b//x - (a-1)//x)
p03861
s589846268
Accepted
#import itertools #import fractions #import numpy as np #mod = 10**4 + 7 """def kiri(n,m): r_ = n / m if (r_ - (n // m)) > 0: return (n//m) + 1 else: return (n//m)""" # Written by NoKnowledgeGG @YlePhan #import math #mod = 10**9+7 def main(): a,b,x = map(int,input().split()) print(b//x - (a-1)//x) if __name__ == '__main__': main()
p03861
s184962101
Accepted
a, b, x = map(int, input().split()) print(b//x - (a - 1)//x)
p03861
s938631210
Accepted
a,b,x = map(int, input().split()) print((b//x) - ((a-1)//x))
p03861
s783506328
Accepted
import sys readline = sys.stdin.readline a,b,x = map(int,readline().split()) print((b // x) - (a - 1)// x)
p03861
s844650629
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
s379841890
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
s550715662
Accepted
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 else: ans += 1 ans += b//x - a//x print(ans)
p03861
s876294537
Accepted
a, b, x = map(int, input().split()) min_div = a // x max_div = b // x if a % x == 0: ans = max_div - min_div + 1 else: ans = max_div - min_div print(ans)
p03861
s786513062
Accepted
#!/usr/local/bin python # -*- coding: utf-8 -*- # # ~/PycharmProjects/atcoder/B-BetweenAandB.py # a, b, x = map(int, input().split()) print(b//x - (a-1)//x)
p03861
s039328144
Accepted
import sys readline = sys.stdin.readline readlines = sys.stdin.readlines ns = lambda: readline().rstrip() # input string ni = lambda: int(readline().rstrip()) # input int nm = lambda: map(int, readline().split()) # input multiple int nl = lambda: list(map(int, readline().split())) # input multiple int to list a, b, x = nm() d_min = x - (a % x) if d_min == x: d_min = 0 d_max = b % x min = a + d_min max = b - d_max if min > max: ans = 0 else: ans = ((max - min) // x + 1) print(ans)
p03861
s019011483
Accepted
A, B, X = map(int, input().split()) def f(N): return N // X print(f(B) - f(A - 1))
p03861
s785731565
Accepted
a,b,x=map(int,input().split()) print(b//x-(a-1)//x if a>0 else b//x+1)
p03861
s171605825
Accepted
a, b, x = map(int, input().split()) if a == 0: print(b//x+1) else: print(b//x-(a-1)//x)
p03861
s023891184
Accepted
a, b, x = map(int, input().split(' ')) answer = b//x - (a-1)//x print(answer)
p03861
s502423950
Accepted
a, b, x = map(int, input().split()) start = a if a % x == 0 else x * (a // x) + x if b - start >= 0: ans = (b - start) // x + 1 else: ans = 0 print(ans)
p03861
s051461196
Accepted
a, b, x = map(int, input().split()) A = -((-a) // x) B = b // x print(B - A + 1)
p03861
s297871087
Accepted
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 bcnt = b // x ans = bcnt - acnt print(ans)
p03861
s172110884
Accepted
a, b, x = map(int, input().split()) if a % x == 0: if b % x == 0: print(b // x - a // x + 1) else: print(b // x - a // x + 1) else: if b % x == 0: print(b // x - a // x) else: print(b // x - a // x)
p03861
s143378865
Accepted
a,b,x = map(int,input().split()) if a==0 and b==0: print(1) elif a == 0: print(b//x+1) else: print(b//x - (a-1)//x)
p03861
s356217759
Accepted
import numpy as np import math import sys def sinput(): return sys.stdin.readline() def iinput(): return int(sinput()) def imap(): return map(int, sinput().split()) def fmap(): return map(float, sinput().split()) def iarr(): return list(imap()) def farr(): return list(fmap()) def sarr(): return sinput().split() a, b, x = imap() ans = (b//x) - (a//x) if a % x == 0: ans += 1 print(ans)
p03861
s534580987
Accepted
(a,b,x) = map(int,input().split()) if a==0: print(int(b//x)+1) else: print(int(b//x)-int((a-1)//x))
p03861
s011765041
Accepted
a, b, x = map(int,input().split()) if a%x == 0 : first = a // x else : first = ( a + x - a%x ) // x if b%x == 0 : end = b // x else : end = ( b - b%x ) // x ans = end - first + 1 print(ans)
p03861
s100204561
Accepted
def warikire(n,r): if r==1: return n+1 else: return n//r+1 a,b,x=map(int,input().split()) if a==0: print(warikire(b,x)) else: print(warikire(b,x)-warikire(a-1,x))
p03861
s159199472
Accepted
A, B, x = map(int,input().split()) b_d = B//x+1 a_d = A//x if A!=0 and A%x!=0: a_d+=1 print(b_d - a_d)
p03861
s797635470
Accepted
a, b, x = map(int, input().split()) print(b//x - (a - 1)//x)
p03861
s772046168
Accepted
from decimal import * a, b, x = map(Decimal, input().split()) if a == 0: a_div = 0 else: a_div = (a-1) // x + 1 b_div = b // x + 1 ans = b_div - a_div print(ans)
p03861
s676748197
Accepted
a,b,x=map(int,input().split()) ax=(a-1)//x bx=b//x print(bx-ax)
p03861
s119582230
Accepted
a,b,x = map(int,input().split()) print(b//x - (a-1)//x)
p03861
s665730945
Accepted
a, b, x = map(int, input().split()) print(b//x - a//x + (a%x == 0))
p03861
s233411940
Accepted
a,b,x=map(int,input().split()) num_a=a//x num_b=b//x ans=num_b-num_a if a%x==0: ans+=1 print(ans)
p03861
s700666287
Accepted
a, b, x = map(int, input().split()) A = a // x - (a % x == 0) B = b // x print(B - A)
p03861
s447812591
Accepted
a,b,x=map(int,input().split()) ap=a//x bp=b//x ans=bp-ap if a%x==0: ans+=1 print(ans)
p03861
s854975893
Accepted
a,b,x=map(int, input().split()) print(b//x-(a-1)//x)
p03861
s349136874
Accepted
a,b,x = map(int,input().split()) print(b//x-(a-1)//x)
p03861
s562825524
Accepted
a,b,x=map(int,input().split()) B=b//x A=(a-1)//x print(B-A)
p03861
s021425859
Accepted
a,b,x=map(int,input().split()) print(b//x - (a-1)//x)
p03861
s026800207
Accepted
a, b, x = map(int, input().split()) print(b//x - (a-1)//x)
p03861
s668103897
Accepted
a, b, x = map(int, input().split()) A = b//x B = a//x if a%x == 0: print(A-B+1) else: print(A-B)
p03861
s573894509
Accepted
a, b, x = map(int, input().split()) # ans = 0 bx = b//x + 1 ax = (a-1)//x + 1 ans = bx - ax print(ans)
p03861
s090290602
Accepted
a,b,x=map(int,input().split()) if a==0: print(b//x+1) else: print((b//x)-((a-1)//x))
p03861
s099508826
Accepted
def main(): a, b, x = map( int, input().split()) print(b//x - (a-1)//x) if __name__ == '__main__': main()
p03861
s366220906
Accepted
a,b,x=map(int,input().split()) print(b//x-(a-1)//x)
p03861
s080450226
Accepted
a,b,x=map(int,input().split()) if a==0: fl=-1 else: fl=(a-1)//x cl=b//x print(cl-fl)
p03861
s328506976
Accepted
a, b, x = map(int, input().split()) print((b // x) - ((a - 1) // x))
p03861
s348192039
Accepted
a,b,x = map(int, input().split()) print(b//x - a//x + (a%x == 0))
p03861
s995080977
Accepted
a, b, x = map(int, input().split()) print(b // x - (a - 1) // x)
p03861
s928533407
Accepted
def main(): import sys input = sys.stdin.readline sys.setrecursionlimit(10**7) from collections import Counter, deque #from collections import defaultdict from itertools import combinations, permutations, accumulate, groupby #from itertools import product from bisect import bisect_left,bisect_right from heapq import heapify, heappop, heappush from math import floor, ceil #from operator import itemgetter #inf = 10**17 #mod = 10**9 + 7 a,b,x = map(int, input().split()) print(b//x - (a-1)//x) if __name__ == '__main__': main()
p03861
s431398526
Accepted
a,b,x = list(map(int, input().split())) print(b//x - (a-1)//x)
p03861
s001860335
Accepted
def answer(a: int, b: int, x: int) -> int: return b // x - (a - 1) // x def main(): a, b, x = map(int, input().split()) print(answer(a, b, x)) if __name__ == '__main__': main()
p03861
s848250628
Accepted
a,b,x = map(int, input().split()) ans = (b//x) - ((a-1)//x) print(ans)
p03861
s068487942
Accepted
a, b, x = map(int, input().split()) print(b//x - (a-1)//x)
p03861
s464556913
Accepted
a,b,x = map(int,input().split()) print(b//x-(a-1)//x)
p03861
s235391635
Accepted
a, b, x = map(int, input().split()) ans = b // x - (a - 1) // x print(ans)
p03861
s748479455
Accepted
abx = input().split() a, b, x = int(abx[0]), int(abx[1]), int(abx[2]) print(int(b//x) - int((a-1)//x))
p03861
s211739550
Accepted
a,b,x = map(int,input().split()) if a%x == 0: ans = b//x - a//x + 1 else: ans = b//x - (a + x - a%x)//x + 1 print(ans)
p03861
s248053612
Accepted
a, b, x = map(int, input().split()) if a%x == 0: print((b//x+1) - (a//x)) else: print((b//x+1) - (a//x+1))
p03861
s062602626
Accepted
#ABC048.B a,b,x = map(int,input().split()) print(b//x - (a-1)//x)
p03861
s979661458
Accepted
def main(): end, start, divisor = [int(i) for i in input().split()] a = start//divisor - (end-1)//divisor print(a) main()
p03861
s191454228
Accepted
a,b,x = map(int,input().split()) cnt = b // x - (a - 1) // x print(cnt)
p03861
s054590923
Accepted
a, b, x = map(int, input().split()) print(b//x - (a-1)//x )
p03861
s463404539
Accepted
#48b a,b,x = map(int, input().split()) down = a//x if down*x == a: down -= 1 up = b//x #print(up,down) print(up - down)
p03861
s593562839
Accepted
a, b, x = list(map(int, input().split())) print(b // x - (a - 1) // x)
p03861
s989393651
Accepted
a,b,x = map(int,input().split()) print((b//x)-((a-1)//x))
p03861
s065444555
Accepted
a,b,x=map(int,input().split()) print(b//x-(a-1)//x)
p03861
s741097452
Accepted
a,b,x = map(int, input().split()) # a,b,x = map(int, "9 9 2".split()) cnt=0 alfa = b//x + 1 beta = (a-1)//x + 1 print(alfa - beta)
p03861
s193404103
Accepted
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() result = count_num(b, x) - count_num(a - 1, x) print(result) def count_num(num, x): if num < 0: return 0 return num // x + 1 run() # 2 4 3 # 3 4 3 # 2 6 3
p03861
s923210084
Accepted
a,b,x=map(int,input().split()) a1=a//x if a%x==0: a1-=1 b1=b//x print(b1-a1)
p03861
s149912499
Accepted
a,b,x = map(int,input().split()) ans = 0 if a%x==0: ans = (b-a)//x+1 else: c = (a//x+1)*x ans = (b-c)//x+1 print(ans)
p03861
s928126040
Accepted
a,b,x = map(int,input().split()) print(b//x-(a-1)//x)
p03861
s188554333
Accepted
a, b, x = map(int, input().split()) print(b // x - (a - 1) // x)
p03861
s871106507
Accepted
a,b,x = map(int,input().split()) print(int(b//x)-int((a-1)//x))
p03861
s062574477
Accepted
import sys sys.setrecursionlimit(10 ** 7) rl = sys.stdin.readline def solve(): a, b, x = map(int, rl().split()) ans = b // x - a // x if a % x == 0: ans += 1 print(ans) if __name__ == '__main__': solve()
p03861
s524583919
Accepted
a, b, x = map(int, input().split()) print(b // x - (a - 1) // x)
p03861
s824610016
Accepted
a, b, x = map(int, input().split()) c=b//x if a%x==0: d=a//x-1 else: d=a//x print(c-d)
p03861
s851773801
Accepted
a, b, x = map(int, input().split()) p = 0 y = int(b//x) + 1 i = 1 #for i in range(1,y): while x*i <= b: if a <= x*i: p = x*i break i += 1 if p != 0: t = b-p s = t//x ans = s + 1 if a == 0: ans += 1 print(ans) elif a == 0: print(1) else: print(0)
p03861
s628787397
Accepted
import sys input = sys.stdin.readline a,b,x=map(int,input().split()) print(b//x-(a-1)//x)
p03861
s723354930
Accepted
A, B, X = map(int, input().split()) P, r = divmod(A, X) if r: P += 1 Q, r = divmod(B, X) #print(P, Q) print(max(0, Q-P+1))
p03861
s274128593
Accepted
a,b,x = map(int,input().split()) print(b//x - (a-1)//x)
p03861
s785380060
Accepted
a, b, x = map(int, input().split()) a_div = (a - 1) // x + 1 b_div = b // x + 1 print(b_div - a_div)
p03861
s751726545
Accepted
a,b,x = map(int, input().split()) if a == 0: print(b//x+1) else: print(b//x-(a-1)//x)
p03861
s157031824
Accepted
a, b, x = map(int, input().split()) print(b // x - (a - 1) // x)
p03861
s969233589
Accepted
a, b, x = map(int, input().split()) if a % x != 0 : aa = a//x+1 else : aa = a//x bb = b //x print(bb - aa + 1 )
p03861
s185552054
Accepted
def resolve(): ''' code here ''' a, b, x = [int(item) for item in input().split()] _a = a // x _b = b // x if a % x == 0: res = _b - _a + 1 else: res = _b - _a print(res) if __name__ == "__main__": resolve()
p03861
s920488200
Accepted
a,b,x = map(int,input().split()) cnt2 = b//x cnt1 = (a-1)//x print(cnt2-cnt1)
p03861
s961096798
Accepted
a, b, x = map(int, input().split(" ")) ad = a // x bd = b // x ans = bd - ad if a % x == 0: ans += 1 print(ans)
p03861
s103856390
Accepted
a, b, x = map(int,input().split()) a_divmod = divmod(a, x) if a_divmod[1] != 0: print(b//x - a_divmod[0]) else: print(b//x - a_divmod[0] + 1)
p03861
s551386130
Accepted
a,b,x = map(int,input().split()) ad = (a-1)//x bd = b//x print(bd-ad)
p03861
s312770070
Accepted
a,b,x=map(int,input().split()) shita=a//x ue=b//x if a%x==0: print(ue-shita+1) else: print(ue-shita)
p03861
s689933813
Accepted
a,b,x=map(int,input().split()) print(b//x-(a-1)//x)
p03861
s614402534
Accepted
a,b,x = map(int, input().split()) if a%x == 0: buf1 = a//x - 1 else: buf1 = a//x buf2 = b//x print(buf2 - buf1)
p03861
s603261546
Accepted
a,b,x = map(int, input().split()) print(b//x - (a+x-1)//x + 1)
p03861
s031182667
Accepted
a,b,x = map(int,input().split()) ans = b//x - (a-1)//x print(ans)
p03861
s580466910
Accepted
a, b, x = map(int, input().split()) print(b // x + 1 if a == 0 else b // x - (a - 1) // x)