problem_id
stringclasses
100 values
submission_id
stringlengths
10
10
status
stringclasses
2 values
code
stringlengths
6
806
p03861
s272577796
Accepted
a, b, x = list(map(int, input().split())) ans = (b // x) - (a // x) if a % x == 0: ans += 1 print(ans)
p03861
s759353090
Accepted
a,b,x=map(int,input().split()) s=b//x t=a//x ans=s-t if a%x==0: ans+=1 print(ans)
p03861
s777101812
Accepted
a,b,x = map(int,input().split()) d = b//x if a%x == 0: e = a//x else: e = a//x + 1 print(d-e+1)
p03861
s517442552
Accepted
a, b, x = map(int,input().split()) nb = b//x na_1 = (a-1)//x print(nb-na_1)
p03861
s882742757
Accepted
a, b, x = [int(i) for i in input().split()] print(b//x - (a-1)//x)
p03861
s282313184
Accepted
a,b,x = map(int,input().split()) if a != 0: dum1 = ((a-1) // x) + 1 else: dum1 = 0 dum2 = (b//x)+1 print(dum2-dum1)
p03861
s961615188
Accepted
a, b, x = map(int, input().split()) print( b//x - (a-1)//x )
p03861
s568862287
Accepted
a,b,x=map(int,input().split()) if a%x==0: a-=x elif b%x==0: b+=x elif b%x<a%x: b+=x count=(b-a)//x if count<0: count=0 print(count)
p03861
s617163757
Accepted
a,b,x=map(int,input().split()) if a==0: print(b//x+1) else: print(b//x-(a-1)//x)
p03861
s034574401
Accepted
a, b, x = map(int, input().split()) if x == 1: print(b - a + 1) exit() if a == 0: print(b // x + 1) exit() print(b // x - (a-1) // x)
p03861
s266821851
Accepted
a, b, k = map(int, input().split()) def n(x): return 0 if x == -1 else x // k + 1 print(n(b) - n(a-1))
p03861
s930917872
Accepted
import sys input = sys.stdin.readline def read(): a, b, x = map(int, input().strip().split()) return a, b, x def solve(a, b, x): return b // x - (a-1) // x if __name__ == '__main__': inputs = read() print(solve(*inputs))
p03861
s736270924
Accepted
#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) if a==0: print((b//x)+1) else: print((b//x)+1-(((a-1)//x)+1))
p03861
s638160174
Accepted
a, b, x = map(int, input().split()) cnt = 0 def f(n, x=x): if n >= 0: return n//x + 1 else: return 0 cnt = int(f(b) - f(a-1)) print(cnt)
p03861
s173720779
Accepted
a,b,x=map(int,input().split()) if a>2: s=b//x t=(a-1)//x print(s-t) elif a==1: print(b//x) elif a==0: print(b//x+1)
p03861
s666340544
Accepted
import numpy as np import functools import math import scipy import fractions import itertools def solve(): a, b, x = map(int, input().split()) hoge = b // x huga = (a-1) // x print(hoge-huga) return 0 if __name__ == "__main__": solve()
p03861
s373810084
Accepted
a,b,x = map(int,input().split()) ans = b//x - max(0,(a-1))//x if a == 0: ans += 1 print(ans)
p03861
s192286314
Accepted
a,b,x=map(int,input().split()) a_cnt=a//x b_cnt=b//x print(b_cnt-a_cnt+1 if a%x==0 else b_cnt-a_cnt)
p03861
s913400107
Accepted
a,b,x=map(int,input().split()) X=(b-b%x) if a>X: print(0) else: print(1+(X-a)//x)
p03861
s069796654
Accepted
a, b, x = map(int, input().split()) print(b//x-(a-1)//x)
p03861
s764421810
Accepted
a,b,x=map(int,input().split()) aa=(a-1)//x bb=b//x print(bb-aa)
p03861
s238611564
Accepted
a,b,x=map(int, input().split()) max=b//x min=(a+x-1)//x print(max-min+1)
p03861
s061616312
Accepted
import numpy as np a,b,x = [int(i) for i in input().split()] a_below = int((a-1)//x) b_below = int(b//x) ans= b_below-a_below print(ans)
p03861
s822992867
Accepted
a,b,x=map(int,input().split()) print(b//x-(a-1)//x)
p03861
s291792422
Accepted
p=0;q=0;r=0 a,b,x=map(int,input().split()) p=int(b//x+1) q=int((a-1)//x+1) r=int(p-q) print(int(r))
p03861
s275986844
Accepted
a, b, x = map(int, input().split()) print((b//x) + (-a//x) + 1)
p03861
s389486824
Accepted
a, b, x = [int(s) for s in input().split()] q, m = divmod(a, x) print(b // x - q + (1 if m == 0 else 0))
p03861
s915260211
Accepted
a,b,x=map(int,input().split()) newb=b//x newa=a//x amari=a%x ans=newb-newa if amari==0: ans+=1 print(ans)
p03861
s601682539
Accepted
#!/usr/bin/env python3 a, b, x = map(int, input().split()) print(b//x - (a-1)//x)
p03861
s884065999
Accepted
a,b,x = map(int,input().split()) print(b//x-(a-1)//x)
p03861
s488931545
Accepted
#!/usr/bin/env python3 import sys def input(): return sys.stdin.readline()[:-1] def main(): def f(n): return n // x + 1 a, b, x = map(int, input().split()) print(f(b) - f(a - 1)) if __name__ == '__main__': main()
p03861
s122310141
Accepted
a, b, x = map(int, input().split()) a += (x - a % x) if a % x != 0 else 0 answ = (b - a) // x if a % x != 0 else (b - a) // x + 1 print(answ)
p03861
s386663945
Accepted
a, b, x = map(int, input().split()) if a == 0: pa = 0 else: pa = (a - 1) // x + 1 if b == 0: pb = 1 else: pb = b // x + 1 print(pb - pa) # 0 1 2 3 4 5 # ^
p03861
s031856803
Accepted
a,b,x = map(int,input().split()) ans = b//x - (a-1)//x print(ans)
p03861
s853379846
Accepted
# https://atcoder.jp/contests/abc048/tasks/abc048_b # B問題だけど緑パフォ a, b, x = map(int, input().split()) print(b // x - (a - 1) // x)
p03861
s520506828
Accepted
a, b, x = map(int, input().split()) print(b//x-(a-1)//x)
p03861
s802184127
Accepted
a, b, x = map(int,input().split()) A = (a-1)//x B = b//x print(B - A)
p03861
s648242480
Accepted
a,b,x = map(int,input().split()) ans = b//x - a//x if a%x == 0: ans += 1 print(ans)
p03861
s928547042
Accepted
a,b,x = map(int,input().split()) if a == 0: print(b // x + 1) else: a -= 1 print(b // x - a // x)
p03861
s044212407
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
s541568517
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
s379708511
Accepted
import math from decimal import Decimal a,b,x=map(int,input().split()) print(math.floor(Decimal(b)/Decimal(x))-math.ceil(Decimal(a)/Decimal(x))+1)
p03861
s366481600
Accepted
a, b, x = tuple(map(int, input().split())) if x == 0: print("0") elif x == 1: print(len(range(a, b+1))) else: cnt_b = b // x cnt_a = (a-1) // x print(cnt_b - cnt_a)
p03861
s220672072
Accepted
a,b,x = map(int, input().split()) work1 = b // x work2 = (a - 1) // x print(work1 - work2)
p03861
s879445258
Accepted
a,b,x=map(int,input().split()) print(b//x-(a-1)//x)
p03861
s767239941
Accepted
a,b,x = map(int, input().split()) s = b//x t = (a-1)//x print(s-t)
p03861
s854604239
Accepted
a,b,x = map(int, input().split()) print(b//x - (a-1)//x)
p03861
s135439913
Accepted
a, b, x = map(int, input().split()) print(b // x - (a - 1) // x)
p03861
s186525305
Accepted
a, b, x = map(int, input().split()) def count(a, b, x): m = b // x + 1 n = 0 if a > 0: n = (a - 1) // x + 1 return m - n print(count(a, b, x))
p03861
s354161932
Accepted
a, b, x = map(int, input().split()) res = b // x - (a + x - 1) // x + 1 print(res)
p03861
s890525107
Accepted
A,B,C = map(int,input().split()) ans = 0 ans += B // C ans -= (A-1) // C print(ans)
p03861
s432782588
Accepted
def ans() : a, b, x = tuple(map(int, input().split())) c1 = b // x c2 = (a - 1) // x print(c1 - c2) ans()
p03861
s911955647
Accepted
a,b,x=map(int,input().split()) b_count=b//x a_count=(a-1)//x print(b_count-a_count)
p03861
s753090725
Accepted
x,y,d=map(int,input().split()) ans=y//d-(x-1)//d print(ans)
p03861
s245030464
Accepted
a,b,x=map(int,input().split()) def f(n,x): return n//x+1 print(f(b,x)-f(a-1,x))
p03861
s651276099
Accepted
a, b, x = map(int, input().split()) s = 1 if a % x == 0 else 0 print(b // x - a // x + s )
p03861
s779894815
Accepted
a, b, x = map(int, input().split()) ans = b//x - a//x if a%x ==0: ans += 1 print(ans)
p03861
s152316220
Accepted
a, b, x = map(int, input().split()) ans = 0 ans = (b//x+1) - ((a-1)//x+1) print(ans)
p03861
s224111216
Accepted
a,b,x = map(int,input().split()) if a != 0: print(b // x - (a - 1) // x) else: print(b // x + 1)
p03861
s647592308
Accepted
a, b, x = map(int, input().split()) print(b // x - (a - 1) // x)
p03861
s222705375
Accepted
a,b,x = map(int, input().split()) print(b//x-(a-1)//x if a!=0 else b//x+1)
p03861
s887279971
Accepted
a, b, x = map(int, input().split()) print(b//x - (a-1)//x)
p03861
s625718989
Accepted
a, b, x = map(int, input().split()) print(b // x - (a - 1) // x)
p03861
s746378669
Accepted
a, b, x = map(int, input().split()) a -= 1 cnt = b//x - a//x print(cnt)
p03861
s519224760
Accepted
a,b,x=map(int,input().split()) print(b//x-(a+x-1)//x+1)
p03861
s456947314
Accepted
import sys def input(): return sys.stdin.readline().strip() def main(): a, b, x = map(int, input().split()) print(b // x - (a - 1) // x) if __name__ == "__main__": main()
p03861
s661322682
Accepted
a, b, x = map(int, input().split()) if a == 0: print(b//x + 1) else: print(b//x - (a-1)//x)
p03861
s447096207
Accepted
a,b,x=map(int,input().split()) print(b//x-(a-1)//x)
p03861
s214902654
Accepted
a,b,x=map(int,input().split()) ans = b // x - (a-1)//x print(ans)
p03861
s685287157
Accepted
a,b,x = map(int,input().split()) if a == 0: print(b//x + 1) else: print((b//x) - ((a-1)//x))
p03861
s314053777
Accepted
a, b, x = map(int, input().split()) A = (a-1)//x B = b//x ans = B-A print(ans)
p03861
s143438726
Accepted
def main(): a, b, x = map(int, input().split()) atmp = (a-1)//x btmp = b//x ans = btmp - atmp print(ans) if __name__ == "__main__": main()
p03861
s999591081
Accepted
A, B, X = map(int, input().split()) ans=(B//X) - ((A-1)//X) print(ans)
p03861
s469724718
Accepted
a, b, x = map(int, input().split()) # オーバーフロー # cnt = len([_ for _ in range(a, b + 1, x)]) print(b // x - (a - 1) // x if a - 1 >= 0 else b // x - a // x + 1)
p03861
s813915979
Accepted
a,b,x = map(int,input().split()) a_num = 0 b_num = 0 if a == 0: b_num = (b//x)+1 else: a_num = ((a-1)//x)+1 b_num = (b//x)+1 print(b_num-a_num)
p03861
s605740146
Accepted
a, b, c = map(int, input().split()) if a == 0: print(b // c+1) exit() print(b // c - (a-1) // c)
p03861
s140063147
Accepted
from sys import stdin def main(): #入力 readline=stdin.readline a,b,x=map(int,readline().split()) if a==0: print(b//x+1) else: print(b//x-(a-1)//x) if __name__=="__main__": main()
p03861
s450155567
Accepted
a, b, x = map(int, input().split()) print((b // x) - ((a - 1)// x))
p03861
s253271207
Accepted
a,b,x = map(int,input().split()) if a%x == 0 : print(b//x - a//x + 1) elif a%x is not 0 : print(b//x - a//x)
p03861
s040315020
Accepted
a, b, x = map(int,input().split()) print(-a//x+ b//x+1)
p03861
s492546999
Accepted
a,b,x = map(int,input().split()) fisrt = 0 if a%x == 0: first = a//x else: first = a//x +1 last = b//x print(last - first + 1)
p03861
s005181572
Accepted
a, b, x = map(int, input().split()) if a % x ==0: l = a//x else: l = a //x +1 r = b//x ans = r - l +1 print(ans)
p03861
s070132410
Accepted
a, b, x = map(int, input().split()) print(b//x-(a-1)//x if a!=0 else b//x+1)
p03861
s395485064
Accepted
a,b,x=map(int,input().split()) a1=a//x b1=b//x print(b1-a1 if a%x!=0 else b1-a1+1)
p03861
s164721601
Accepted
a,b,x = map(int, input().split()) b = b // x+1 if a != 0: a = (a-1) // x+1 print(b - a)
p03861
s605178536
Accepted
A, B, X = map(int, input().split()) bx = B // X ax = A // X if A % X == 0: print(bx - ax + 1) else: print(bx - ax)
p03861
s753779707
Accepted
def read_int(): return int(input().strip()) def read_ints(): return list(map(int, input().strip().split(' '))) def solve(): a, b, x = read_ints() return b//x-(a-1)//x if __name__ == '__main__': print(solve())
p03861
s316010797
Accepted
def resolve(): a, b, x = map(int, input().split()) ans = calc(x, b) - calc(x, a-1) print(ans) def calc(x, n): if n == -1: return 0 else: return n//x + 1 if __name__ == '__main__': resolve()
p03861
s439951639
Accepted
a,b,x = map(int,input().split()) print((b//x)-((a-1)//x))
p03861
s055814539
Accepted
# -*- coding: utf-8 -*- # スペース区切りの整数の入力 a, b, x = map(int, input().split()) print(b // x - a // x + (1 if a % x == 0 else 0))
p03861
s326515003
Accepted
def main(): a, b, x = map(int, input().split()) ans = b // x - (a - 1) // x print(ans) if __name__ == "__main__": main()
p03861
s019791570
Accepted
a, b, x = map(int, input().split()) print(b // x - (a - 1) // x)
p03861
s584500212
Accepted
a,b,x = map(int, input().split()) print(b//x-(a-1)//x)
p03861
s920754746
Accepted
nums = [int(e) for e in input().split()] def f(n, x): if n >=0: return int(n//x)+1 elif n==-1: return 0 print(f(nums[1], nums[2])-f(nums[0]-1, nums[2]))
p03861
s404956636
Accepted
a, b, x = map(int, input().split()) low = (a-1) // x up = b // x print(up-low)
p03861
s706828184
Accepted
a, b, x = [int(x) for x in input().split()] b_num = b // x a_num = (a - 1) // x if a - 1 >= 0 else -1 print(b_num - a_num)
p03861
s173426725
Accepted
import sys readline = sys.stdin.readline MOD = 10 ** 9 + 7 INF = float('INF') sys.setrecursionlimit(10 ** 5) def main(): a, b, x = map(int, readline().split()) print(b // x - (a - 1) // x) if __name__ == '__main__': main()
p03861
s495973196
Accepted
a, b, x = map(int, input().split()) b_mod = b//x+1 a_mod = (a-1)//x+1 if a > 0 else 0 ans = b_mod - a_mod print(ans)
p03861
s059136699
Accepted
a,b,x = map(int, input().split()) ans = b//x - (a-1)//x print(ans)
p03861
s515214975
Accepted
a,b,c=list(map(int,input().split())) print(b//c-(a-1)//c)