problem_id stringclasses 100
values | submission_id stringlengths 10 10 | status stringclasses 2
values | code stringlengths 6 806 |
|---|---|---|---|
p03861 | s589871690 | Accepted | a, b, x = [int(_) for _ in input().split()]
ans = b//x - a//x + int(not(a%x))
print(ans) |
p03861 | s248980559 | Accepted | a, b, x = map(int, input().split())
c = -1
if a % x == 0:
c = x - 1
else:
c = a % x - 1
ans = (b-a + 1 + c) // x
print(ans) |
p03861 | s820752436 | Accepted | a,b,x = map(int,input().split())
ans = b//x-(a+x-1)//x+1
print(ans) |
p03861 | s523537247 | Accepted | 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)//x)
|
p03861 | s372703250 | Accepted | # -*- coding: utf-8 -*-
def main():
a, b, x = map(int, input().split())
ans = 0
ans = (b // x) - ((a-1) // x)
print(ans)
if __name__ == "__main__":
main() |
p03861 | s431207870 | Accepted | a,b,x=map(int,input().split())
print(b//x-(a-1)//x) |
p03861 | s288170285 | Accepted | # Vicfred
# https://atcoder.jp/contests/abc048/tasks/abc048_b
# math
a, b, x = list(map(int, input().split()))
print(b//x - (a-1)//x)
|
p03861 | s730888462 | Accepted | a,b,x=map(int,input().split())
ans=b//x-a//x
print(ans+1 if a%x == 0 else ans) |
p03861 | s253936484 | Accepted | import sys
read = sys.stdin.read
readline = sys.stdin.readline
readlines = sys.stdin.readlines
sys.setrecursionlimit(10 ** 9)
INF = 1 << 60
MOD = 1000000007
def main():
a, b, x = map(int, readline().split())
if b == 0:
ans = 1
elif a == 0:
ans = b // x + 1
else:
ans = b // x - (a - 1) // x
print(ans)
return
if __name__ == '__main__':
main()
|
p03861 | s329297449 | Accepted | def main():
a,b,x=map(int,input().split())
if a%x>0:
a += x-a%x
print((b-a)//x+1)
main() |
p03861 | s750234238 | Accepted | a,b,c=map(int,input().split())
def f(x,c):
if x==-1:
return 0
else:
return x//c+1
print(f(b,c)-f(a-1,c)) |
p03861 | s481430559 | Accepted | a, b, x = map(int, input().split())
print(b//x - (a-1)//x)
|
p03861 | s115290097 | Accepted | a,b,x=map(int,input().split())
print(b//x-(a-1)//x) |
p03861 | s985600440 | Accepted | a, b, x = map(int, input().split())
ans = b//x - (a-1)//x
print(ans) |
p03861 | s839061435 | Accepted | # coding: utf-8
a,b,x=map(int,input().split())
ans=b//x-a//x
if a%x==0:
ans+=1
print(ans) |
p03861 | s298207274 | Accepted | #!/usr/bin/env python3
a, b, x = map(int, input().split())
print(b//x-(a-1)//x)
|
p03861 | s733632398 | Accepted | a, b, x = map(int, input().split())
cnt = b // x + 1
if a == 0:
print(cnt)
else:
print(cnt - ((a - 1) // x + 1)) |
p03861 | s186280455 | Accepted | nim, mike, kite = map(int, input().split())
print((mike // kite) - ((nim - 1) // kite)) |
p03861 | s333584360 | Accepted | a, b, x = map(int, input().split())
l = a//x + 1
if a % x == 0:
l -= 1
r = b//x
print((r - l) + 1) |
p03861 | s486311239 | Accepted | from decimal import *
a, b, x = map(int, input().split())
ax = int(Decimal(a) / Decimal(x))
bx = int(Decimal(b) / Decimal(x))
am = a % x
bm = b % x
if ax == bx and am != 0 and bm != 0:
print(0)
elif am == 0:
print(bx - ax + 1)
else:
print(bx - ax) |
p03861 | s694970241 | Accepted | import sys
input = sys.stdin.readline
a, b, x = map(int, input().split(' '))
m = b//x+1
n = 0
if a > 0:
n = (a-1)//x+1
ans = m - n
print(ans) |
p03861 | s655488998 | Accepted | a,b,x = map(int,input().split())
ans = b//x - (a+x-1)//x + 1
print(ans) |
p03861 | s813182614 | Accepted | a,b,x=map(int, input().split())
print(b//x-(a-1)//x)
|
p03861 | s334560758 | Accepted | a, b, x = map(int, input().split())
print(b // x + 1 - ((a - 1) // x + 1))
|
p03861 | s608305138 | Accepted | import sys
input = sys.stdin.readline
def I(): return int(input())
def MI(): return map(int, input().split())
def LI(): return list(map(int, input().split()))
def main():
mod=10**9+7
a,b,x=MI()
ans=b//x-(a-1)//x
print(ans)
main()
|
p03861 | s291024655 | Accepted | def resolve():
a, b, x = list(map(int, input().split()))
print((b//x)-((a-1)//x))
if '__main__' == __name__:
resolve() |
p03861 | s645001286 | Accepted | a, b, x = map(int, input().split())
print(b//x - (a-1)//x) |
p03861 | s910927148 | Accepted | a, b, c = map(int, input().split())
print(b // c - (a-1) // c) |
p03861 | s436906127 | Accepted | a, b, x = [int(i) for i in input().split()]
ans = b // x - a // x
if a % x == 0:
ans += 1
print(ans)
|
p03861 | s187825482 | Accepted | a,b,x=map(int, input().split())
Ans = (b//x)-((a-1)//x)
print(Ans)
|
p03861 | s151415687 | Accepted | a, b, x = map(int, input().split())
ans = b // x - a // x
if a % x == 0:
ans += 1
print(ans) |
p03861 | s312226883 | Accepted | a, b, x = map(int, input().split())
a -= 1
print(b // x - a // x) |
p03861 | s506613506 | Accepted | a,b,x = map(int,input().rstrip().split(" "))
p = b // x - a // x
if a % x == 0:
p += 1
print(p)
|
p03861 | s956945824 | Accepted | A,B,X = map(int,input().split())
print(((B//X)*X+(-A//X)*X)//X+1) |
p03861 | s344992120 | Accepted | a, b, x = map(int, input().split())
def hoge(n, x):
return max(n // x + 1, 0)
print(hoge(b, x) - hoge(a-1, x))
|
p03861 | s380070941 | Accepted | a, b, x = map(int, input().split())
print(b // x - (a - 1) // x)
|
p03861 | s296921651 | Accepted | a,b,x = list(map(int,input().split()))
ans=0
if a!=b:
A = (a-1)//x
B = b//x
ans = B - A
elif a==0 and b==0:
ans=1
elif a==x and b==x:
ans=1
print(ans) |
p03861 | s986927601 | Accepted | a,b,x = map(int,input().split())
zenbu = b // x +1
tmp = 0
if a % x == 0:
tmp += 1
bubun = a // x +1
ans = zenbu - bubun + tmp
print(ans) |
p03861 | s377104267 | Accepted | a,b,x=map(int,input().split())
ans = b//x - a//x
if a%x == 0:
ans += 1
print(ans) |
p03861 | s249615201 | Accepted | a,b,x=map(int,input().split())
a_p=a//x
b_p=b//x
if a%x==0:
print(b_p-a_p+1)
else:
print(b_p-a_p) |
p03861 | s643373545 | Accepted | a, b, x = map(int, input().split())
ans = b // x - (a - 1) // x
print(ans)
|
p03861 | s852606463 | Accepted | import decimal
decimal.getcontext().prec=50
a,b,x=map(int,input().split())
a=decimal.Decimal(a)
b=decimal.Decimal(b)
print(int(b/x)-int((a+x-1)/x)+1) |
p03861 | s331544182 | Accepted | a,b,x=map(int,input().split())
if x==1:
print(b-a+1)
else:
print(b//x-(a-1)//x) |
p03861 | s994248199 | Accepted | a,b,x=(int(x) for x in input().split())
if a==0:
print(1+b//x)
else:
c=b//x-(a-1)//x
print(c)
|
p03861 | s233807450 | 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 | s150212348 | Accepted | import math
from decimal import *
a, b, x = map(int, input().split(" "))
print(math.floor(Decimal(b)/Decimal(x)) - math.ceil(Decimal(a)/Decimal(x)) + 1) |
p03861 | s370287936 | Accepted | a,b,x = map(int,input().split())
a -= 1
ans = b//x - a//x
print(ans)
|
p03861 | s402804146 | Accepted | import re
import copy
def accept_input():
a,b,x = map(int,input().split())
return a,b,x
a,b,x = accept_input()
print(b // x - (a - 1) // x)
"""
if a%x == 0 and a != b:
print(b//x - a//x +1)
elif a%x == 0 and a == b:
print(0)
else:
print(b//x - a//x)
"""
|
p03861 | s419453310 | Accepted | A,B,X=map(int,input().split())
a=A%X
b=B%X
if a!=0:
A=A+X-a
if b!=0:
B=B-b
print((B-A)//X+1) |
p03861 | s386946942 | Accepted | a,b,x = map(int, input().split())
c = (b // x) - ((a - 1) // x)
d = c
print(d) |
p03861 | s893922631 | Accepted | a, b, x = map(int, input().split())
l = (a+x-1)//x
r = b//x
print(r-l+1)
|
p03861 | s781037086 | 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 if a > 0 else -1
bcnt = b // x if b != 0 else 1
ans = bcnt - acnt if not(a == b == 0) else 1
print(ans)
|
p03861 | s117315671 | Accepted | a, b, x = map(int,input().split())
print(b//x + (-a//x) + 1)
|
p03861 | s916525641 | Accepted | a,b,x=map(int,input().split())
t1 = (a-1)//x
t2 = b//x
res = t2-t1
print(res)
|
p03861 | s430139446 | Accepted | # -*- coding: utf-8 -*-
a, b, x = map(int,input().split())
print(b // x - (a - 1) // x)
|
p03861 | s174700252 | Accepted | a,b,x = map(int,input().split())
def get(n):
if n<0:
return 0
else:
return n//x + 1
print(get(b)-get(a-1)) |
p03861 | s855408347 | Accepted | a,b,x = map(int, input().split())
if a%x != 0: a += (x-a%x)
if b%x != 0: b -= b%x
ans = b//x - a//x +1 if a <= b else 0
print(ans) |
p03861 | s484406048 | Accepted | a, b, x=map(int, input().split())
print((b//x)-((a-1)//x)) |
p03861 | s555810977 | Accepted | import sys
input = sys.stdin.readline
def main():
A, B, X = [int(x) for x in input().split()]
print(B // X - (A - 1) // X)
if __name__ == '__main__':
main()
|
p03861 | s018788795 | Accepted | a,b,x = map(int,input().split())
a1 = -(-a//x) * x
b1 = b//x * x
print((b1-a1)//x+1)
|
p03861 | s792728950 | Accepted | 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-1)//z))
if x==0:
ans=ans
print(ans) |
p03861 | s044305422 | Accepted | arr = input().split()
arr = list(map(int,arr))
a = arr[0]
b = arr[1]
x = arr[2]
def f(n):
if n == -1:
return 0
else:
return n // x + 1
print(f(b) - f(a-1))
|
p03861 | s009071418 | Accepted | start, end, div = list(map(int, input().strip().split()))
count = end // div - start //div
if start % div == 0:
count += 1
print(count) |
p03861 | s205933008 | Accepted | a,b,x=map(int,input().split())
k=a//x
l=a%x
p=b//x
q=b%x
if l==0:
print(p-k+1)
else:
print(p-k)
|
p03861 | s553770683 | Accepted | a, b, x = map(int, input().split())
print(b//x - (a-1)//x) |
p03861 | s947187711 | Accepted | import sys
from collections import Counter
from collections import deque
import math
import fractions
def input(): return sys.stdin.readline().strip()
def mp(): return map(int,input().split())
def lmp(): return list(map(int,input().split()))
a,b,x=mp()
print(b//x-(a-1)//x) |
p03861 | s238412306 | Accepted | a, b, x = map(int, input().split())
c = a // x
d = b // x
if a % x == 0:
c -= 1
print(d - c) |
p03861 | s606317734 | Accepted | a, b, x = map(int, input().split())
print(b//x - (a-1)//x) |
p03861 | s785782938 | Accepted | a,b,x = map(int, input().split())
print(b // x - (a-1) // x) |
p03861 | s639423118 | Accepted | a,b,x = map(int,input().split())
if a%x == 0:
min = a//x - 1
else:
min = a//x
max = b//x
print(max-min) |
p03861 | s379683254 | Accepted | a, b, x = map(int, input().split())
print(b//x - (-(-a//x)) + 1) |
p03861 | s176212618 | Accepted | a,b,x=list(map(int,input().split()))
print(b//x - (a-1)//x) |
p03861 | s180089029 | Accepted | import math as m
from decimal import *
a,b,x = map(int,input().split())
tot = b-a+1
rem = a%x
getcontext().prec = 100
if rem > 0:
tot-=x-rem
print(m.ceil(Decimal(tot)/Decimal(x))) |
p03861 | s429213935 | Accepted | l = list(map(int,input().split()))
a = l[0]
b = l[1]
x = l[2]
if a%x == 0:
print(b//x-a//x +1)
else:
print(b//x-a//x) |
p03861 | s204412642 | Accepted | a, b, x = map(int, input().split())
ans = 0
ans = (b//x) - ((a-1)//x)
print(ans) |
p03861 | s770873315 | 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 | s733946328 | Accepted | a, b, x = map(int, input().split())
ans = int(b//x) - int(a//x)
if a%x ==0:
ans += 1
print(ans) |
p03861 | s914371162 | Accepted | # B - Between a and b ...
def main():
a, b, x = map(int, input().split())
if a == 0:
print(b//x+1)
else:
print(b//x-((a-1)//x))
if __name__ == "__main__":
main() |
p03861 | s981346556 | Accepted | a,b,x = map(int, input().split())
ans = b // x - (a - 1) // x;
print(ans) |
p03861 | s987015930 | Accepted | a,b,x = map(int,input().split())
print(b//x-(a-1)//x) |
p03861 | s597840542 | Accepted | a, b, x = map(int, input().split())
def f(n):
if n < 0:
return 0
else:
a = n // x + 1
return a
ans = f(b) - f(a - 1)
print(ans) |
p03861 | s798924683 | Accepted | import math
import sys
import numpy as np
from decimal import *
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
# ----------------------------------------
a, b, x = map(int, readline().split())
ans = Decimal(b // x) - Decimal(a // x)
if (a % x == 0):
ans += 1
print(int(ans))
|
p03861 | s695025208 | Accepted | a, b, x = map(int, input().split())
if a == 0:
print(b//x + 1)
else:
print(b//x - (a-1)//x)
|
p03861 | s655196657 | Accepted | a,b,x=map(int, input().split())
print(b//x-((a-1)//x+1)+1) |
p03861 | s667021499 | Accepted | import math
a, b, x = map(int,input().split())
print(b//x - (a-1)//x) |
p03861 | s004751966 | Accepted | a,b,x=map(int,input().split())
print(b//x-(a-1)//x) |
p03861 | s285526561 | Accepted | a,b,x = map(int, input().split())
print(b//x-(a-1)//x) |
p03861 | s868745525 | Accepted | A,B,X=map(int,input().split())
print(B//X-(A-1)//X) |
p03861 | s784285169 | Accepted | lst = input().split()
a = int(lst[0])
b = int(lst[1])
x = int(lst[2])
if a % x != 0:
a = x * ((a // x) + 1)
if b % x != 0:
b = x * (b // x)
print(((b - a) // x) + 1) |
p03861 | s605234112 | Accepted | # 2020/05/03
# AtCoder Beginner Contest 048 - B
# Input
a, b, x = map(int,input().split())
# Calc
wk_v1 = (a - 1) // x
wk_v2 = b // x
ans = wk_v2 - wk_v1
# Output
print(ans)
|
p03861 | s183433704 | Accepted | A,B,X = list(map(int,input().split()))
print(B//X-(A-1)//X)
|
p03861 | s937264080 | Accepted | a, b, x = map(int, input().split())
mn = a if a % x == 0 else (a // x) * x + x
mx = b if b % x == 0 else (b // x) * x
result = ((mx - mn) // x) + 1
print(result)
|
p03861 | s377422594 | Accepted | a, b, x = [int(_) for _ in input().split()]
ans = b//x - a//x
if a%x == 0:
ans += 1
print(ans) |
p03861 | s449226564 | Accepted | import math
a, b, x = map(int,input().split())
def fnc(n,x):
if n == -1:
return 0
return n//x+1
print(fnc(b,x) - fnc((a-1),x)) |
p03861 | s662608427 | Accepted | a, b, x = map(int, input().split())
print(b//x - (a-1)//x) |
p03861 | s856290356 | Accepted | a,b,x = map(int, input().split())
hoge = b//x - a//x
if a%x == 0:
hoge += 1
print(hoge) |
p03861 | s290124690 | Accepted | a, b, x = map(int, input().split())
ans = b // x - a // x
if a % x == 0:
ans += 1
print(ans) |
p03861 | s551656174 | Accepted | import bisect, collections, copy, heapq, itertools, math, string, sys
input = lambda: sys.stdin.readline().rstrip()
sys.setrecursionlimit(10**7)
INF = float('inf')
def I(): return int(input())
def F(): return float(input())
def SS(): return input()
def LI(): return [int(x) for x in input().split()]
def LI_(): return [int(x)-1 for x in input().split()]
def LF(): return [float(x) for x in input().split()]
def LSS(): return input().split()
def resolve():
a, b, x = LI()
ans = b // x - (a - 1) // x
print(ans)
if __name__ == '__main__':
resolve()
|
p03861 | s204428863 | Accepted | a, b, x = map(int, input().split())
if a == 0:
print(b // x + 1)
exit()
print(b // x - (a-1) // x) |
p03861 | s107639642 | Accepted | import sys
input = sys.stdin.readline
def f(n, x):
if n == -1:
return 0
else:
return n // x + 1
def main():
a, b, x = map(int, input().split())
ans = f(b, x) - f(a - 1, x)
print(ans)
if __name__ == "__main__":
main()
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.