problem_id
stringclasses
100 values
submission_id
stringlengths
10
10
status
stringclasses
2 values
code
stringlengths
6
806
p03861
s679889052
Wrong Answer
import math a,b,x = map(int,input().split()) print(b//x - math.ceil(a/x) + 1)
p03861
s449862683
Wrong Answer
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) else: if bx == 0: print(bx - ax) else: print(bx - ax + 1)
p03861
s286499778
Wrong Answer
a, b, x = map(int, input().split()) p = 0 y = int(b//x) + 1 for i in range(1,y): if a <= x*i: p = x*i break if p != 0: t = b-p s = t//x ans = s + 1 if a == 0: ans += 1 print(ans) else: print(0)
p03861
s110261450
Wrong Answer
a, b, x = map(int, input().split()) print(( -(a + (x - a%x)) + (b - b%x) ) // x + 1)
p03861
s037107100
Wrong Answer
a,b,x = map(int,input().split()) ans = 0 if a%x==0: c = a ans = 1 else: c = (a//x+1)*x ans = 0 while c<b: c += x ans += 1 #print(c) print(ans)
p03861
s580188541
Wrong Answer
a,b,x = map(int,input().split()) if a%x == 0 or b%x == 0: print(int((b-a)//x)+1) elif a%x == 0 and b%x == 0: print(int((b-a)//x)+2) else: print(int((b-a)//x))
p03861
s541763331
Wrong Answer
a,b,x = map(int, input().split()) ax = min(0,(a-1)//x) bx = b//x #print(ax) #print(bx)# print(bx-ax+1)
p03861
s950690070
Wrong Answer
import math a,b,x = map(int,input().split()) print(math.floor(b/x)-math.floor((a-1)/x))
p03861
s883714132
Wrong Answer
# coding: utf-8 a, b, x = map(int, input().split(" ")) def f(n): if n == 0: return 0 else: return n // x + 1 print(f(b) - f(a-1))
p03861
s879450061
Wrong Answer
a,b,x = map(int, input().split()) print(b//x-a//x+1 if a%x==0 and b%x==0 else b//x-a//x)
p03861
s653159377
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)) if a == 0: print(int(Decimal(b/x))) else: print(int(Decimal(b/x)) - int(Decimal((a-1)/x)))
p03861
s868362915
Wrong Answer
# ABC048B #import import math # input a, b, x = [int(i) for i in input().split()] # c = math.floor((b/x)) - (math.ceil(a/x)-1) c = (b//x) - ((a//x)-1) if c <= 0: print(0) else: print(c)
p03861
s846213591
Wrong Answer
a,b,x = map(int,input().split()) t = 0 if a % x == 0: t += 1 print((b - a) // x + t)
p03861
s597593222
Wrong Answer
a,b,x = map(int,input().split()) if a==0 and b==0: print(0) elif a == 0: print(b//x+1) else: print(b//x - (a-1)//x)
p03861
s245454366
Wrong Answer
abx = input().split() a, b, x = int(abx[0]), int(abx[1]), int(abx[2]) print(int(b/x - (a-1)/x))
p03861
s143922830
Wrong Answer
a,b,x = map(int,input().split()) bn = (-b%x)+b an = (-a%x)+a ans = (bn-an)//x if a%x ==0 or b%x == 0: ans += 1 print(ans)
p03861
s680418601
Wrong Answer
a,b,x=input().split() a,b,x=int(a),int(b),int(x) n=(b-a)//x if (b-a)-n*x-a%x>=0: n+=1 print(n)
p03861
s628058315
Wrong Answer
a, b, x = map(int, input().split()) if a%2==0: print(int(b/x)-int(a/x)+1) else: print(int(b/x)-int(a/x))
p03861
s330610066
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
s329221919
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 or b % x == 0: r += 1 print(r) if __name__ == '__main__': main()
p03861
s164410651
Wrong Answer
a,b,x = map(int,input().split()) q_b = b//x q_a = a//x if x==1: print(b-a+1) else: print(int(q_b-q_a))
p03861
s932105112
Wrong Answer
import math a,b,x = map(int,input().split()) if b < x: print(0) else: print(b//x - math.ceil(a/x) + 1)
p03861
s960913679
Wrong Answer
a, b, x = map(int, input().split()) def divided_num(n): return n//x + 1 if a==b: print(0) else: print(divided_num(b)-divided_num(a)+1)
p03861
s868424357
Wrong Answer
a,b,x = map(int,input().split()) c = b - a if a % x == 0 and b % x == 0: print(c // x + 1) else: print(c // x)
p03861
s400736532
Wrong Answer
a, b, x = map(int,input().split()) r = (b+x-a) // x print(r)
p03861
s015408094
Wrong Answer
a,b,x = map(int,input().split()) ans = (b-a)//x if a%x == 0: ans += 1 if a != b and b%x == 0: ans += 1 if (b-a)%x == 0: ans -= 1 print(ans)
p03861
s241797664
Wrong Answer
import sys input=sys.stdin.readline a,b,c = map(int,input().split()) ans = b//c - a//c print(ans)
p03861
s105733707
Wrong Answer
a, b, x = map(int, input().split()) if a % x == 0: print((b-a)//x +1) else : print((b-a)//x)
p03861
s001843093
Wrong Answer
A,B,X=map(int,input().split()) ans=0 ans+=1*(A%X==0) ans+=(B-A)//X print(ans)
p03861
s495048858
Wrong Answer
[a,b,x]=list(map(int,input().split()));print(b//x-a//x+1)
p03861
s185222791
Wrong Answer
a, b, x = map(int, input().split(" ")) n = b//x if a>0: m = a//x else: m=1 ans = n-m print("{}".format(ans))
p03861
s798840347
Wrong Answer
a,b,x = map(int,input().split()) mi = a//x ma = b//x if (a%x == 0 or b%x == 0): print(ma-mi+1) else: print(ma-mi)
p03861
s392566770
Wrong Answer
#48b import math a,b,x = map(int, input().split()) first = math.ceil(a/x) end = b//x print(end - first + 1)
p03861
s172743271
Wrong Answer
a, b, x = map(int, input().split()) aa = b//x bb = a//x if a/x != int(a/x): print (aa-bb) else: print (aa-bb+1)
p03861
s297744246
Wrong Answer
a, b, x = map(int, input().split()) ans = 0 if a%x == 0: ans += 1 ans += (b-a)//x print(ans)
p03861
s505124175
Wrong Answer
a,b,c=map(int,input().split()) if a==b: print(0) else: if a%c==0: print(-(-(b-a)//c)+1) else: print(-(-(b-a)//c))
p03861
s085349123
Wrong Answer
a, b, x = map(int, input().split()) cnt = int(b/x - (a-1)/x) print(cnt)
p03861
s916007055
Wrong Answer
a, b, x = map(int, input().split()) if a == 0 and b % x == 0: print((b-a)//x) elif a % x == 0 or b % x == 0: print((b-a)//x + 1) else: print((b-a)//x)
p03861
s408962900
Wrong Answer
a, b, x = map(int, input().split(" ")) n = b - a add = 0 if a % x == 0: add += 1 if b % x == 0: add +=1 print(n // x + add)
p03861
s768728948
Wrong Answer
a,b,x=map(int,input().split()) a2=a//x b2=b//x if a%x==b%x==0: print(b2-a2+1) else: print(b2-a2)
p03861
s373894742
Wrong Answer
p=0;q=0;r=0 a,b,x=map(int,input().split()) p=int(b//x+1) q=int((a-0.1)//x+1) r=int(p-q) print(int(r))
p03861
s240786417
Wrong Answer
a,b,x=input().split() a,b,x=int(a),int(b),int(x) n=(b-a+1)//x if n==0: if (b-a+1)%x>a%x: n+=1 elif (b-a+1)%x-(a//x*x-a)>0: n+=1 print(n)
p03861
s037259969
Wrong Answer
a, b, x = map(int, input().split()) A = b//x B = a//x print(A-B+1)
p03861
s030189506
Wrong Answer
a,b,x = list(map(int,input().split())) a1 = a//x a2 = b//x if b%x else b//x-1 print(a1-a2)
p03861
s436877361
Wrong Answer
a,b,x = map(int,input().split()) ans = ((b-a)//x) if a % x == 0: ans += 1 print(ans)
p03861
s693466894
Wrong Answer
a,b,x = map(int,input().split()) c = b - a if a % x == 0 or b % x == 0: print(c // x + 1) else: print(c // x)
p03861
s203752786
Wrong Answer
a, b, x = map(int, input().split()) bb = b // x aa = a // x if a % 2 == 0: aa -= 1 if a == 0: print(bb+1) else: print(bb-aa)
p03861
s306178262
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() if a > 0: a -= 1 ans = b//x - a//x print(ans)
p03861
s255161494
Wrong Answer
a, b, x = map(int, input().split()) ans = (b - a) // x + 1 if b >= 10**18: b -= x print((b - a) // x + 1)
p03861
s630046035
Wrong Answer
# -*- coding : utf-8 -*- a,b,x = map(int, input().split()) A = a // x B = b // x print( b-a + 1)
p03861
s118703070
Wrong Answer
a, b, x = map(int, input().split(" ")) ans = (b - a )//x + 1 if a % x != 0 and b % x != 0 and (b - a) % x == 0: ans -= 1 print(ans)
p03861
s108109765
Wrong Answer
a,b,x = map(int,input().split()) if a % x == 0 or b % x == 0: print((b - a) // x + 1) else: print((b - a) // x)
p03861
s496591204
Wrong Answer
a,b,x=map(int,input().split()) #TLE######################### # ans=0 # for i in range(a,b+1): # if i%x==0: # ans+=1 # print(ans) ################################ print(b/x - (a-1)//x)
p03861
s365960082
Wrong Answer
from sys import stdin def ceil(a,b): return (a+b+1)//b def floor(a,b): return a//b if __name__ == "__main__": _in = [_.rstrip() for _ in stdin.readlines()] a,b,x = list(map(int,_in[0].split(' '))) # type:list(int) # vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv cnt = floor(b,x)-ceil(a,x)+1 # ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ print(cnt)
p03861
s520769043
Wrong Answer
import sys numbers = sys.stdin.readline().split(' ') a = int(numbers[0]) b = int(numbers[1]) c = int(numbers[2]) if a > 0: print(int(b//c - (a-1)//c)) else: print(int(b//c))
p03861
s539320449
Wrong Answer
a, b, x = map(int, input().split()) d=(b-a)//x if a%x==0: d=d+1 print(d) else: print(d)
p03861
s593152151
Wrong Answer
import sys a,b,x=map(int,input().split()) count = 0 ans = 0 for i in range(a,b+1): if i%x==0: count += 1 ans = i break while True: if ans == 0: break elif ans < b: ans += x count += 1 else: break print(count)
p03861
s848229475
Wrong Answer
a,b,x = map(int,input().split()) if a%x==0: print((b-a)//x+1) else: print((b-a)//x)
p03861
s630359534
Wrong Answer
import math a,b,x = map(int,input().split()) c = 0 print(sum([1 for i in range(4,8+1) if i % x == 0]))
p03861
s207837637
Wrong Answer
a,b,x=map(int,input().split()) p=a+(x-(a%x)) q=b-(b%x) ans =1+(q-p)//x print(ans)
p03861
s903601066
Wrong Answer
x = list(map(int,input().split())) a = 0 b = x[1]+1 for i in range(min(x[1],max(x[0],x[2])),x[1]): if i % x[2] ==0: a = 1 b=i break c = ((x[1]-b)//x[2]) + 1 print(c)
p03861
s997660784
Wrong Answer
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))
p03861
s171573555
Wrong Answer
a,b,x = map(int,input().split()) if a%x == 0 or b%x == 0: print(int((b-a)//x)+1) else: print(int((b-a)//x))
p03861
s045065126
Wrong Answer
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()) a,b,c = cin() print(b//c - a//c)
p03861
s415075613
Wrong Answer
a, b, x = map(int, input().split()) if x == a: print((b - a + 1) // x + 1) else: print((b - a + 1) // x)
p03861
s049157591
Wrong Answer
a, b, x = map(int,input().split()) if b%x == 0: print(b//x-a//x+1) else: print(b//x-a//x)
p03861
s037587438
Wrong Answer
x = list(map(int,input().split())) a = 0 if x[0]%x[2]==0: b = x[2] else: b = ((x[0] // x[2])+1)*x[2] c = (x[1]-b)//x[2] + 1 if x[0]==0: c+=1 print(c)
p03861
s433649052
Wrong Answer
a,b,x = map(int, input().split()) print((b-a)//x+1 if a%x==0 else (b-a)//x)
p03861
s679085413
Wrong Answer
a, b, x = map(int, input().split()) print(b//x-a//x)
p03861
s832637124
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 if diff == 0: if x > a and x < b: print(1) return print(diff) run() # 2 4 3
p03861
s810443708
Wrong Answer
a, b, x = map(int, input().split()) ans = (b - a) // x if a % x == 0 or b % x == 0: ans += 1 print(ans)
p03861
s031800864
Wrong Answer
a,b,x=map(int,input().split()) ans=0 ans=(b-a+1)//x r=a%x if x-r+a+ans*x<=b: ans+=1 print(ans)
p03861
s662487236
Wrong Answer
x,y,z=list(map(int, input().split())) ans=0 if x==y: if x%z==0: print(1) else: print(0) else: if x%z==0: ans=ans+1 if y%z==0: ans=ans+1 print((y-x-1)//z+ans)
p03861
s791253846
Wrong Answer
a, b, x = map(int, input().split()) if a % x == 0: print((b-a) // x + 1) else: print((b-a+1)//x)
p03861
s082782511
Wrong Answer
a,b,x = map(int,input().split()) print((b - a) // x)
p03861
s790610619
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
s310323011
Wrong Answer
# AtCoder Beginner Contest 048 - B # -*- encoding: UTF-8 -*- a,b,x = map(int, input().split()) x_min = 0 if a % x == 0 : x_min = a / x else : x_min = a // x + 1 x_max = 0 if b % x == 0 : x_max = b / x else: x_max = b // x result = 0 x_num = int(x_max - x_min + 1) print(x_num)
p03861
s201987273
Wrong Answer
INT = lambda: int(input()) INTM = lambda: map(int,input().split()) STRM = lambda: map(str,input().split()) STR = lambda: str(input()) LIST = lambda: list(map(int,input().split())) LISTS = lambda: list(map(str,input().split())) def do(): a,b,x=INTM() if a>=1: cta=a//x else: cta=0 ctb=b//x print(ctb-cta) if __name__ == '__main__': do()
p03861
s391121508
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())) import math def run(): a, b, x = input_int_map() start = math.ceil(a / x) * x if start > b: print(0) return result = (b - start) // x print(result) run() # 2 4 3 # 3 4 3 # 2 6 3
p03861
s928339537
Wrong Answer
a,b,x = map(int, input().split()) print((b-a+1)//x + 1 if a%x==0 and b%x==0 else (b-a+1)//x)
p03861
s464957382
Wrong Answer
a, b, x = map(int, input().split()) ans = 0 for i in range(b): if i % x == 0: ans += 1 for j in range(a): if j % x == 0: ans -= 1 print(ans)
p03861
s428738733
Wrong Answer
import math a, b, x = map(int, input().split(" ")) print(math.floor(b/x) - math.ceil(a/x) + 1)
p03861
s488833980
Wrong Answer
a, b, x = map(int, input().split()) if a%2==0: print(b//x-a//x+1) else: print(b//x-a//x)
p03861
s778134943
Wrong Answer
a, b, x = map(int, input().split(" ")) ans = (b - a )//x if a % x == 0: ans += 1 if b % x == 0: ans += 1 print(ans)
p03861
s815931136
Wrong Answer
import numpy as np a, b, x = map(int, input().split()) upper = np.floor(b / x) lower = np.ceil(a/x) ans = int(upper - lower + 1) print(ans)
p03861
s802646904
Wrong Answer
a, b, x = map(int, input().split(" ")) print((b-a)//x)
p03861
s068175393
Wrong Answer
# https://atcoder.jp/contests/abc048/tasks/abc048_b a, b, x = map(int, input().split()) a_x = a // x b_x = b // x ans = abs(a_x - b_x) mi = b if a < b: mi = a if mi % x == 0 and mi != 0: ans += 1 print(ans)
p03861
s986470638
Wrong Answer
a,b,x=map(int,input().split()) if a%x==0: a-=x count=(b+1-a)//x if count<0: count=0 print(count)
p03861
s692600074
Wrong Answer
a, b, x = list(map(int, input().split())) print(b // x - a // x)
p03861
s562646102
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)) if a == 0: print(b//x) else: print(b//x - (a-1)//x)
p03861
s218436806
Wrong Answer
a, b, x = map(int, input().split()) if a == 0: print(b//x) else: print(b//x - (a-1)//x)
p03861
s118764114
Wrong Answer
a,b,c=input().split() a=int(a) b=int(b) c=int(c) count=0 for i in range(a,b): if i%c==0: count=count+1 print(count)
p03861
s415376684
Wrong Answer
a,b,x=map(int, input().split()) print(b//x-a//x)
p03861
s750651346
Wrong Answer
a,b,x=map(int,input().split()) import math ta=math.ceil(a/x) tb=b//x if a==0: ans=tb-ta else: ans=tb-ta+1 print(ans)
p03861
s743680236
Wrong Answer
a,b,x=map(int,input().split()) if a>=x: for i in range(a,b+1): if i%x==0: y=(b-i)//x print(y+1) exit() elif x<=b: for i in range(x,b+1): if i%x==0: y=(b-i)//x print(y+1) exit() else: print(0) exit() print(0)
p03861
s686204183
Wrong Answer
# coding: utf-8 a, b, x = map(int, input().split(" ")) n = b - a print(n // x + 1)
p03861
s990704977
Wrong Answer
# -*- coding: utf-8 -*- """ Created on Sat May 30 16:32:18 2020 @author: NEC-PCuser """ a, b, x = map(int, input().split()) a_shou = a / x b_shou = b / x ans = b_shou - a_shou if (a % x == 0 or b % x == 0): ans += 1 print(int(ans))
p03861
s031465951
Wrong Answer
a,b,x = map(int,input().split()) if a%x==0: cnt = 1 else: cnt = 0 while True: a += x if a<=b: cnt += 1 else: break print(cnt)
p03861
s097408831
Wrong Answer
a, b, x = map(int, input().split()) diff = b-a ans = diff // x ans += int((a%x==0) or (b%x==0)) print(ans)
p03861
s460170290
Wrong Answer
a, b, x = map(int, input().split()) diff = b-a ans = diff // x if a == 0: ans += 1 print(ans+1)