problem_id
stringclasses
100 values
submission_id
stringlengths
10
10
status
stringclasses
2 values
code
stringlengths
6
806
p03861
s767788989
Wrong Answer
import math a,b,x=map(int, input().split()) A=math.ceil(a/x) B=math.floor(b/x) print(B-A+1)
p03861
s997302245
Wrong Answer
a, b, x = map(int, input().split()) if (b-a+1) % x == 0: ans = (b-a+1) // x elif a % x == 0 or b % x == 0: ans = (b-a+1) // x + 1 else: ans = (b-a+1) // x print(ans)
p03861
s159079464
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(b/c - (a-1)/c) else: print(b/c)
p03861
s808823699
Wrong Answer
import math a, b, x = map(int, input().split()) xa = math.ceil(a / x) xb = b // x print(xb - xa + 1)
p03861
s764115038
Wrong Answer
a, b, x = map( int, input().split()) print( a//x - b//x +1)
p03861
s827462343
Wrong Answer
a,b,x = map(int,input().split()) num = a cnt = 0 while a <= num <= b and num % x == 0: cnt += 1 num += x print(cnt)
p03861
s918118072
Wrong Answer
x, y, z = map(int,input().split()) print(y//z - x//z +1)
p03861
s989560347
Wrong Answer
a,b,x = map(int,input().split()) m = 0 if b % x == 0: m += 1 c = b - a print(m + c // x)
p03861
s282254133
Wrong Answer
a,b,x = map(int,input().split()) ans = 0 if (b-a)%x==0: print((b-a)//x + 1) elif b-a==0: print(0) else: print((b-a)//x)
p03861
s995083229
Wrong Answer
import sys import math 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(math.floor(b//c))
p03861
s668796828
Wrong Answer
A, B, X = map(int, input().split()) (B//X) - (A//X) + 1 print((B//X) - (A//X) + 1)
p03861
s147181006
Wrong Answer
import math import sys import numpy as np read = sys.stdin.buffer.read readline = sys.stdin.buffer.readline readlines = sys.stdin.buffer.readlines # ---------------------------------------- a, b, x = map(int, read().split()) ''' num = b - a + 1 arr = np.linspace(a, b, num) div = np.where(arr % x == 0) ans = div[0][0] ''' if (b < x): ans = 0 else: if (a == 0): ans = b // x - a // x + 1 else: ans = b // x - a // x print(ans)
p03861
s560234197
Wrong Answer
a,b,x=map(int,input().split()) k=b-a+1 if a%x!=0 and a!=0: k2=x-(a%x) elif a%x==0 and a!=0: k2=0 else: k2=1 k-=k2 if k<0: print(0) else: print(k//x+1)
p03861
s788783460
Wrong Answer
a,b,x = map(int, input().split()) c = b - a d = c // x print(d)
p03861
s323625169
Wrong Answer
a, b, x = map(int, input().split()) diff = b-a ans = diff // x if a % x == 0: ans += 1 print(ans)
p03861
s317551927
Wrong Answer
a, b, x = map(int, input().split()) c1 = a // x c2 = b // x if a == b: if a % x == 0: print(1) else: print(0) exit() print(c2-c1+1)
p03861
s017258442
Wrong Answer
a,b,x = map(int,input().rstrip().split(" ")) if b - a + 1 >= x: if a % x != 0: a += x - (a % x) b -= (b % x) print((b - a) / x + 1) else: if a + x - (a % x) > b: print(0) else: print(1)
p03861
s556566679
Wrong Answer
a, b, x = map(int, input().split()) if (a - 1) < 0: count_a = 0 else: count_a = (a - 1) // 2 + 1 count_b = b // x + 1 print(count_b - count_a)
p03861
s927560797
Wrong Answer
a,b,x=map(int,input().split()) ans=abs(b-a+1)/x ans_a=a/x ans_b=b/x print(round(ans_b-ans_a))
p03861
s525706893
Wrong Answer
a,b,x = map(int, input().split()) count = (b-a)//x if a%x == 0 or a==0: count += 1 print(count)
p03861
s631212197
Wrong Answer
a, b, x = map(int, input().split()) ans = (b // x) - (a // x) if a == 0: ans += 1 print(ans)
p03861
s072480182
Wrong Answer
a,b,x = map(int,input().split()) ans = 0 if (b-a)%x==0: print((b-a)//x + 1) else: print((b-a)//x)
p03861
s356343529
Wrong Answer
a, b, x = map(int, input().split()) print((b - a) / x)
p03861
s808041905
Wrong Answer
a, b, x = [int(x) for x in input().split()] cnt_a = a // x cnt_b = b // x print(cnt_b-cnt_a)
p03861
s055718214
Wrong Answer
import math a,b,x = [int(i) for i in input().split()] if b > a: N = int(b/x) - math.ceil(a/x) + 1 print(int(N)) else: print(0)
p03861
s565861066
Wrong Answer
a,b,x = map(int,input().split()) a += (x - a%x) b -= b%x ans = 0 if a==b else b//x - a//x + 1 print(ans)
p03861
s075526831
Wrong Answer
a, b, x = map(int, input().split()) ans = (b- a)// x if(a% x == 0 and b% x == 0): print(ans+ 1) else: print(ans)
p03861
s416164824
Wrong Answer
a,b,x=map(int,input().split()) r=b-a if a%x==0 or b%x==0: ans=(b-a)//x+1 elif b==a: ans=0 else: ans=(b-a)//x print(ans)
p03861
s603909640
Wrong Answer
a, b, x = map(int, input().split()) nums = [i if i%x == 0 else 0 for i in range(a, b+1)] print(len(set(nums))-1)
p03861
s776600902
Wrong Answer
a, b, x = map(int, input().split()) cnt = 0 for i in range(1, int(1e18)): if a <= x*i and x*i <= b: cnt += 1 elif b <= x*i: break print(cnt)
p03861
s186338412
Wrong Answer
a,b,c=map(int,input().split()) mini = 0 m = a % c if m == 0: mini = a/c else: mini = (c-m + a)/c maxi = 0 M = b % c if M == 0: maxi = b/c else: maxi = (b-m)/c res = int(maxi) - int(mini) + 1 print(res)
p03861
s172242876
Wrong Answer
a, b, x = map(int,input().split()) if b%x == 0: print(b//x-a//x+1) else: if a%x == 0 and a != 0: print(b//x-a//x+1) else: print(b//x-a//x)
p03861
s367407767
Wrong Answer
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 print(ans)
p03861
s484936008
Wrong Answer
#!/usr/bin/env python import math a, b, x = map(int, input().split()) if a%x == 0: if b%x == 0: if b//x - a//x != 0: ans = b//x - a//x + 1 print(ans) exit() else: ans = b//x - a//x print(ans) exit() ans = b//x - a//x print(ans)
p03861
s040740230
Wrong Answer
import math a,b,x=map(int, input().split()) print(math.floor(b/x)-math.ceil(a/x)+1)
p03861
s368774839
Wrong Answer
a,b,x=map(int,input().split()) print(b//x-(a-1)//x if a>0 else b//x)
p03861
s312603881
Wrong Answer
a,b,x=map(int,input().split()) if a%x>0 and b%x>0: print(b//x-a//x) else: print(b//x-a//x+1)
p03861
s060457941
Wrong Answer
a,b,x = map(int,input().split()) tmp = 0 if x>b: print(0) elif x<a: if a%x==0 or b%x==0: tmp += 1 print((b-a)//x+tmp) else: if b-a>=x: if a%x==0 or b%x==0: tmp += 1 print((b-a)//x+tmp) else: if a%x+b%x==x: tmp += 1 print(tmp)
p03861
s093404399
Wrong Answer
a, b, x = map(int, input().split()) ans = 0 A = a%x B = (b-a)%x if A<=B: ans += 1 ans += (b-a)//x print(ans)
p03861
s171642797
Wrong Answer
a,b,c=map(int,input().split()) mini = 0 maxi = 0 M = b % c m = a % c res = (b-M)/c+(m-a)/c int(res) print(res)
p03861
s236664088
Wrong Answer
a, b, x = map(int, input().split()) i = a j = b while i % x != 0: i+= 1 while j % x != 0: j-= 1 ans = (j- i)/ x+ 1 if(ans<= 0): print(0) else: print(int(ans))
p03861
s637339458
Wrong Answer
import math a, b, z = [int(w) for w in input().split()] l = math.ceil(a/z) r = b//z print(r-l+1)
p03861
s043225585
Wrong Answer
a, b, x = map(int, input().split()) print(b // x - a // x + (1 if (a % x == 0) or (b % x == 0) else 0))
p03861
s722630778
Wrong Answer
a,b,x=map(int,input().split()) d=b-a ans=d//x if a%x==0 or b%x==0: ans+=1 if a==b: ans=0 print(ans)
p03861
s662816644
Wrong Answer
i,j,n=map(int,input().split()) i_num=i/n j_num=j/n cnt=j_num-i_num #print(cnt) if i_num % n==0: cnt+=1 print(cnt)
p03861
s771273134
Wrong Answer
import math A, B, X = [int(s) for s in input().split()] def main(): a = math.ceil(A / X) b = math.floor(B / X) print(b - a + 1) if __name__ == '__main__': main()
p03861
s557876788
Wrong Answer
#48b import math a,b,x = map(int, input().split()) first = math.ceil(a/x) end = b//x if a!=0: print(end - first + 1) else: print(end - first)
p03861
s257448798
Wrong Answer
def resolve(): a, b, x = map(int, input().split()) count = culc(b, x) - culc(a, x) if a % 2 == 0 and b % 2 == 0: count += 1 print(count) def culc(num, x): if num == 0: return -1 else: return num // x + 1 if __name__ == '__main__': resolve()
p03861
s802201938
Wrong Answer
a,b,x = map(int, input().split()) c = b - a d = c // x print(d)
p03861
s320267927
Wrong Answer
a, b, x = map(int, input().split()) if x == 1: print(b - a + 1) exit() if a == b: if b % x == 0: print(1) else: print(0) print(b // x - (a-1) // x)
p03861
s625498797
Wrong Answer
a, b, x = map(int, input().split(" ")) a = 0 if a - 1 < 0 else a - 1 ans = b//x - a//x print(ans)
p03861
s417180234
Wrong Answer
import re import sys import math import itertools import bisect from copy import copy from collections import deque,Counter from decimal import Decimal import functools def v(): return input() def k(): return int(input()) def S(): return input().split() def I(): return map(int,input().split()) def X(): return list(input()) def L(): return list(input().split()) def l(): return list(map(int,input().split())) def lcm(a,b): return a*b//math.gcd(a,b) sys.setrecursionlimit(10 ** 9) mod = 10**9+7 cnt = 0 ans = 0 inf = float("inf") a,b,x = I() ca = a//x cb = b//x ans += cb-ca if b % x == 0: ans += 1 print(ans)
p03861
s348719273
Wrong Answer
a,b,x=map(int,input().split()) k=b-a+1 if a%x!=0 and a!=0: k2=x-(a%x) elif a%x==0 and a!=0: k2=0 else: k2=x k-=k2 if k<=0: print(0) else: print(k//x+1)
p03861
s796233317
Wrong Answer
import math a,b,x = map(int,input().split()) if b > 0: bb = b//x+1 else: bb = 0 if a > 0: a = a - 1 aa = a//x+1 else: aa = 0 print(bb-aa)
p03861
s735288186
Wrong Answer
a, b, x = map(int, input().split()) print(b//x-(a-1)//x, 0)
p03861
s919668496
Wrong Answer
a,b,x = map(int,input().split()) if x>b: print(0) else: if b%x==0: tmp = 1 else: tmp = 0 print((b-a)//x+tmp)
p03861
s606206752
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(b/x)) else: print(int(b/x) - int((a-1)/x))
p03861
s950855289
Wrong Answer
a,b,c = map(int,input().split()) print((b-a+1)//c)
p03861
s216143117
Wrong Answer
a,b,x = map(int,input().split()) if a > x or b < x: print("0") elif a%x == 0: print(b//x-a//x+1) else: print(b//x-a//x)
p03861
s586290764
Wrong Answer
a,b,x=map(int,input().split()) b1=b//x a1=a//x print(b1-a1)
p03861
s558664772
Wrong Answer
a,b,c=map(int,input().split()) s=0 for i in range(a,b): if i%c==0: s+=1 print(s)
p03861
s501353313
Wrong Answer
# -*- coding : utf-8 -*- a,b,x = map(int, input().split()) A = a // x B = b // x if a % x != 0: print(b-a) else: print( b-a + 1)
p03861
s796936669
Wrong Answer
a, b, x = map(int, input().split()) p = 0 for i in range(1,b//x+1): if a <= x*i: p = x*i break if p != 0: t = b-p s = t//x ans = s + 1 print(ans) else: print(0)
p03861
s022979913
Wrong Answer
a,b,x = map(int, input().split()) c = b - a d = c // x print(d)
p03861
s114347140
Wrong Answer
a, b, x = map(int, input().split()) a_mod = b//x+1 b_mod = (a-1)//x+1 if a > 0 else 0 ans = b_mod - a_mod print(ans)
p03861
s202044488
Wrong Answer
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) else: print(0)
p03861
s386401369
Wrong Answer
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 = math.floor(b/x) - math.floor(a/x) if a % x == 0: ans += 1 print(ans)
p03861
s586559964
Wrong Answer
a,b,x = map(int,input().split()) print(b//x - a//x + 1)
p03861
s423536661
Wrong Answer
a,b,x = map(int,input().split()) if a == 0: print((b//x)-(a//x)+1) else: print((b//x)-(a//x))
p03861
s235908055
Wrong Answer
a,b,x = map(int,input().split()) ans = ((b-a)+1)//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
s139436497
Wrong Answer
a,b,x=map(int,input().split()) ta=(a-1)//x tb=b//x ans=tb-ta+1 print(ans)
p03861
s499870185
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 = 1 + (b - start) // x print(result) run() # 2 4 3 # 3 4 3 # 2 6 3
p03861
s846926525
Wrong Answer
a,b,x = [int(i) for i in input().split()] N = int(b/x) - int(a/x) + 1 print(int(N))
p03861
s219546268
Wrong Answer
a, b, x = map(int, input().split()) if a == 0 and b != 0 and b < x: print(0) elif (a/x).is_integer(): print(b//x-a//x+1) else: print(b//x-a//x)
p03861
s638994914
Wrong Answer
import math a,b,x=map(int, input().split()) A=math.ceil(a/x) B=math.floor(b/x) if A>B: print(0) else: print(B-A+1)
p03861
s009506098
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
s804264464
Wrong Answer
#!/usr/bin/env python3 import collections import itertools as it import math #import numpy as np # = input() # = int(input()) a, b, x = map(int, input().split()) # = list(map(int, input().split())) # = [int(input()) for i in range(N)] # # c = collections.Counter() ans = (b - a) // x ans += 1 if a % x == 0 else 0 #ans += 1 if b % x == 0 else 0 print(ans)
p03861
s574394083
Wrong Answer
a, b, c = map(int, input().split()) end = 0 begin = 0 if b%c == 0: end = b//c + 1 else: end = b//c if a%c == 0: print(end - a//c) else: print(end - a//c)
p03861
s714341810
Wrong Answer
a,b,x=map(int,input().split()) if a%x!=0: a+=x-a%x if a>=b: print(0) else: print(b//x-a//x+1)
p03861
s463602436
Wrong Answer
a, b, x = map(int, input().split()) if b-a < x or b < x: print(0) else: ans = (b//x+1)-(a//x+1) print(ans)
p03861
s415706578
Wrong Answer
a, b, x = map(int, input().split()) ans = b // x - a // x print(ans)
p03861
s075499532
Wrong Answer
a,b,x = [int(i) for i in input().split()] d = b//x - a//x a = a/x if a.is_integer(): d+=1 print(d)
p03861
s530691724
Wrong Answer
from decimal import * a, b, x = map(Decimal, input().split()) dif = b - a ans = dif // x if a % x == 0: ans += 1 elif b % x == 0: ans += 1 print(ans)
p03861
s825023128
Wrong Answer
a, b, x = map(int, input().split()) result = 0 if a % x == 0: result += 1 result += ((b - a) // x) print(result)
p03861
s831479596
Wrong Answer
a,b,c=map(int,input().split()) M = b % c m = a % c res = (b-M)/c+(m-a)/c K=int(res)+1 print(K)
p03861
s998144898
Wrong Answer
a,b,x = map(int, input().split()) ax = max(0,(a-1)//x) bx = b//x #print(ax) #print(bx) print(bx-ax)
p03861
s929509805
Wrong Answer
a,b,x = map(int, input().split()) if a//x==a/x: A=a//x else: A=a//x+1 B=b//x print(0 if B-A==0 else B-A+1)
p03861
s483821783
Wrong Answer
a, b, x = map(int, input().split()) # a = p * x + r, b = q * x + s と剰余を使って表す p = a // x q = b // x res = p - q print(res)
p03861
s367564038
Wrong Answer
import math (a,b,x)=map(int, input().split(" ")) print(math.floor(b/x)-math.ceil(a/x)+1)
p03861
s359896348
Wrong Answer
a, b, x = map(int, input().split()) count = 0 if a % x == 0: print((b-a)//x + 1) else: print((b-a)//x)
p03861
s698900914
Wrong Answer
a,b,x = map(int,input().split()) div,mod = divmod(b-a,x) #2,0 if a%x <= mod: print(div+1) #elif a%x > mod: # print(div-1) else: print(div)
p03861
s714376396
Wrong Answer
a, b, x = map(int, input().strip().split()) def func(num1, num2, divide_num): ans = (num2 - num1) // divide_num if num1 % divide_num == 0: ans += 1 print(ans) func(num1=a, num2=b, divide_num=x)
p03861
s518201426
Wrong Answer
a, b, x = map(int, input().split()) ans = (b - a) // x if a % x == 0 and b % x == 0: ans += 1 print(ans)
p03861
s206583440
Wrong Answer
a,b,x = map(int,input().split()) div,mod = divmod(b-a,x) #1,1 if mod == 0 and a%x == 0:# print(div+1) elif a%x < mod: print(div-1) else: print(div)
p03861
s455705371
Wrong Answer
def resolve(): a, b, x = map(int, input().split(" ")) diff = b - a result = diff // x if b%x==0 or a%x==0: result += 1 print(result) if __name__ == "__main__": resolve()
p03861
s425853335
Wrong Answer
(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
s094735438
Wrong Answer
import math import sys import numpy as np read = sys.stdin.buffer.read readline = sys.stdin.buffer.readline readlines = sys.stdin.buffer.readlines # ---------------------------------------- a, b, x = map(int, read().split()) ''' num = b - a + 1 arr = np.linspace(a, b, num) div = np.where(arr % x == 0) ans = div[0][0] ''' if (a == 0): ans = b // x - a // x + 1 else: ans = b // x - a // x print(ans)
p03861
s462777852
Wrong Answer
a, b, x = map(int, input().split(" ")) n = b//x+1 if a>1: m = a//x elif a==1: m=1 elif a==0: m=0 ans = n-m print("{}".format(ans))
p03861
s689744739
Wrong Answer
import math a,b,x = map(int,input().split()) print(math.floor(b/x)-math.floor((a-1)/x))
p03861
s842022067
Wrong Answer
a,b,x = map(int,input().split()) tmp = 0 if a%x==0 or b%x==0: tmp += 1 print((b-a)//x+tmp)