problem_id
stringclasses
100 values
submission_id
stringlengths
10
10
status
stringclasses
2 values
code
stringlengths
6
806
p03861
s479305439
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: bx = b // x if (a == 0): ans = bx else: ax = a // x ans = bx - ax if (a % x == 0): ans += 1 print(ans)
p03861
s014620737
Wrong Answer
a, b, x = map(int, input().split()) aa = a + a % x ans = (b - aa) // x + 1 print(ans)
p03861
s033326205
Wrong Answer
a,b,c = map(int, input().split()) r = a % c == 0 or b % c == 0 if 1 else 0 ans = (b-a)//c + r print(ans)
p03861
s774739091
Wrong Answer
a, b, x = map(int, input().split()) count = 0 if a % x != 0 and b % x != 0: print((b-a)//x) elif a == 0 and b == 0: print(0) else: print((b-a)//x + 1)
p03861
s069468198
Wrong Answer
import math a,b,x = map(int,input().split()) if b > 0: bb = int(b/x)+1 else: bb = 0 if a > 0: a = a - 1 aa = int(a/x)+1 else: aa = 0 print(bb-aa)
p03861
s577655611
Wrong Answer
a, b, x = map(int, input().split()) ans = 0 ans += -(-(b-a) // x) #print(ans) #print((b-a)/x) if a % x == 0 and b % x == 0: ans += 1 print(ans)
p03861
s145951453
Wrong Answer
a,b,x = [int(i) for i in input().split()] if (b-a) % x == 0: print((b-a) // x) else: print((b-a) // x + 1)
p03861
s888347383
Wrong Answer
a,b,x = map(int,input().split()) if a%x == 0: if b%x == 0: print(int((b-a)//x)+2) else: print(int((b-a)//x)+1) elif b%x == 0: if a%x == 0: print(int((b-a)//x)+2) else: print(int((b-a)//x)+1) else: print(int((b-a)//x))
p03861
s716080811
Wrong Answer
a,b,x = map(int, input().split()) cnt=0 for num in range(a, b, 1): if num % x == 0: cnt+=1 print(cnt)
p03861
s007989134
Wrong Answer
a, b, x = map(int, input().split()) print(len(range(a + (0 if a % x else -1), b, x)))
p03861
s347047858
Wrong Answer
a, b, x = map(int, input().split()) ans = (b - a) // x if b % x == 0: ans += 1 if a == b: ans = 0 if max(b, x) == x: ans = 0 print(ans)
p03861
s658169369
Wrong Answer
A, B, X = map(int, input().split()) ans = 0 temp_A = 0 temp_B = 0 for i in range(B, 0, -1): if i % X == 0: temp_B = i break for i in range(A-1, 0, -1): if i % X == 0: temp_A = i break if temp_A != 0: ans_a = temp_A / X else: ans_a = 0 if temp_B != 0: ans_b = temp_B / X else: ans_b = 0 ans = ans_b - ans_a if X == 1: ans = B+1 print('{:.18g}'.format(ans))
p03861
s074163837
Wrong Answer
a, b, x = map(int, input().split()) print((b//x)-(a//x))
p03861
s093851306
Wrong Answer
a,b,x = map(int,input().split()) if a%x == 0: if b%x == 0: print(int((b-a)//x)+1) else: print(int((b-a)//x)) elif b%x == 0: if a%x == 0: print(int((b-a)//x)+1) else: print(int((b-a)//x)) else: print(int((b-a)//x))
p03861
s989506401
Wrong Answer
x = list(map(int,input().split())) a = 0 b = x[1]+1 for i in range(min(x[1],max(x[2],x[0])),x[1]+1): if i % x[2] ==0: a = 1 b=i break c = (x[1]-b)//x[2] + 1 if(x[0]==0): c += 1 print(c)
p03861
s526656287
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) else: print(div)
p03861
s166064034
Wrong Answer
a, b, x = map(int, input().split()) if (a/x).is_integer(): print(b//x-a//x+1) else: print(b//x-a//x)
p03861
s476645582
Wrong Answer
a,b,x = map(int, input().split()) #print(a) #print(b) amari = a%x a2 = amari b2 = b-(a-amari) #print(a2) #print(b2) print((b2-a2)//x+1)
p03861
s071368213
Wrong Answer
a,b,x = map(int, input().split()) count = (b-a)//x if(a%x == 0): count += 1 print(count)
p03861
s458188452
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 if a==b==c: print(1) else: print(c)
p03861
s224852278
Wrong Answer
a, b, x = map(int, input().split()) if (a/x).is_integer() and b >= x: print(b//x-a//x+1) else: print(b//x-a//x)
p03861
s664820058
Wrong Answer
a, b, x = list(map(int, input().split())) if a % x == 0: print(int(b / x) - int(a / x) + 1) else: print(int(b / x) - int(a / x))
p03861
s616026775
Wrong Answer
a,b,x = map(int,input().split()) print((b - a) // x + 1)
p03861
s854080803
Wrong Answer
a, b, x = [int(x) for x in input().split()] a //= x b //= x print(b - a)
p03861
s477269664
Wrong Answer
a, b,c = map(int, input().split()) one = a//c two = b//c print(two-one+1)
p03861
s826753372
Wrong Answer
a,b,x=map(int,input().split()) ans=abs(b-a+1)/x print(round(ans))
p03861
s683126170
Wrong Answer
a, b, x = map(int, input().split()) if a == 0 and b % x == 0 and x != 1: print((b-a)//x) elif a % x == 0 or b % x == 0: print((b-a)//x + 1) else: print((b-a)//x)
p03861
s605575320
Wrong Answer
a, b, x = map(int, input().split()) def f(n, x): if n == -1: return 0 return int(n/x) print(f(b, x) - f(a-1, x))
p03861
s914885031
Wrong Answer
# -*- coding: utf-8 -*- a, b, x = map(int, input().split()) result = (b - a) // x if a % x == b % x == 0: result+=1 print(result)
p03861
s513756512
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 print(ans)
p03861
s143456796
Wrong Answer
a, b, x = list(map(int, input().split())) s = a % x d = b - a ans = (d - s) // x if a > x: ans += 1 print(ans)
p03861
s483284182
Wrong Answer
a,b,x = map(int,input().split()) a += (x - a%x) if a%x else 0 b -= b%x ans = 0 if a==b else b//x - a//x + 1 print(ans)
p03861
s781154765
Wrong Answer
#!/usr/bin/env python3 import sys def input(): return sys.stdin.readline()[:-1] def main(): a, b, x = map(int, input().split()) num = b - a ans = num // x if a % x == 0: ans += 1 print(ans) if __name__ == '__main__': main()
p03861
s871120882
Wrong Answer
a, b, x = map(int, input().split()) count=0 print(len(range(a+a%x, b+1, x)))
p03861
s273086358
Wrong Answer
a, b, x = map(int, input().split()) bb = b // x aa = a // x if a % 2 == 0: aa -= 1 print(bb-aa)
p03861
s195562855
Wrong Answer
a,b,c=map(int,input().split()) d=0 for i in range(a,b+1): if i/c==1: d+=1 print(d)
p03861
s869584552
Wrong Answer
import re import copy def accept_input(): a,b,x = map(int,input().split()) return a,b,x a,b,x = accept_input() 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
s415632999
Wrong Answer
import math a,b,x=map(int, input().split()) print(b//x-math.ceil(a/x)+1)
p03861
s045099711
Wrong Answer
# -*- coding : utf-8 -*- a,b,x = map(int, input().split()) A = a // x B = b // x if b % x != 0: print(b-a) else: print( b-a + 1)
p03861
s244509978
Wrong Answer
a, b, x = map(int,input().split()) r = 0 b_a = b - a r = b_a // x r += 1 print(int(r))
p03861
s168034655
Wrong Answer
a,b,x = map(int,input().split()) if a%2==0: cnt = 1 else: cnt = 0 tmp = a while True: tmp += x if tmp<=b: cnt += 1 else: break print(cnt)
p03861
s853528784
Wrong Answer
a,b,x = map(int,input().split()) a += (a - a%x) b -= b%x ans = b//x - a//x + 1 print(ans)
p03861
s571354865
Wrong Answer
a, b, x = map(int, input().split()) if a == b: print(0) elif (a/x).is_integer(): print(b//x-a//x+1) else: print(b//x-a//x)
p03861
s552026687
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
s512586534
Wrong Answer
a,b,x = map(int,input().split()) ans = 0 if (b-a)%x==0: print((b-a)//x + 1) elif (b-a)%x==0: print(0) else: print((b-a)//x)
p03861
s442298005
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
s615143329
Wrong Answer
a,b,x = map(int, input().split()) a += a % x b -= b % x if a > b: print(0) else: print(1 + (b - a) // x)
p03861
s611397127
Wrong Answer
a, b, x = map(int, input().split()) if 1 <= b // x - a // x: res = b // x - a // x + 1 print(res) elif a==b and a % x == 0: print(1) else: print(0)
p03861
s438033189
Wrong Answer
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 0 bcnt = b // x ans = bcnt - acnt print(ans)
p03861
s846514940
Wrong Answer
import sys input = sys.stdin.readline a, b, x = [int(x) for x in input().split()] B = 1 + b // x if a == 0: print(B) else: A = 1 + a // x print(B - A)
p03861
s699738722
Wrong Answer
a,b,x = map(int,input().split()) k = b-a+1 st = a%x cnt = k//x if st==0 or k-cnt*x>x-st: print(cnt+1) else: print(cnt)
p03861
s522295088
Wrong Answer
a,b,x=map(int,input().split()) ans=0 ans=(b-a+1)//x r=a%x if a+ans*x<=b-r: ans+=1 print(ans)
p03861
s991924708
Wrong Answer
a,b,x=map(int,input().split()) #a<=y<=bใงy%x=0ใ‚’ๆบ€ใŸใ™yใฎๅ€‹ๆ•ฐใ‚’ๆฑ‚ใ‚ใ‚‹ def between(a,b,x): if b<x: print(0) return elif x==1: print(b-a+1) return else: if a<=x: print((b-x)//x+1) return else: print((b-a)//x+1) between(a,b,x)
p03861
s031937375
Wrong Answer
a,b,x=map(int,input().split()) A=a+x-((a-1)%x+1) B=b-b%x print(int((B-A)/x+1))
p03861
s502299489
Wrong Answer
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
s361193220
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()) import math a,b,c = cin() print(b//c - math.ceil(a/c)+1)
p03861
s674015980
Wrong Answer
from decimal import * a, b, x = map(Decimal, input().split()) a_div = (a-1) // x + 1 b_div = b // x + 1 if a == 0: a_div = 0 if b == 0: b_div = 0 ans = b_div - a_div print(ans)
p03861
s482650690
Wrong Answer
a, b, x = map(int, input().split()) ans = 0 if a == 0: ans = int(b/x) + 1 else: ans = int(b/x)-int((a-1)/x) print(ans)
p03861
s716821793
Wrong Answer
a, b, x = map(int,input().split()) r = 0 b = max(a, (b // x) * x) b_a = b - a r = b_a // x if a % x == 0: r += 1 print(int(r))
p03861
s223874908
Wrong Answer
a, b, x = map(int, input().split()) print(b//x - (a//x-1))
p03861
s635002459
Wrong Answer
# coding: utf-8 a, b, x = map(int, input().split(" ")) if (a % x) != 0: start_v = a + x - (a % x) else: start_v = a if b % x != 0: print((b - start_v + 1) // x) else: print((b - start_v + 1) // x + 1)
p03861
s935576901
Wrong Answer
a,b,x = map(int, input().split()) c = (b // x) - ((a - 1) // x) d = c // x print(d)
p03861
s805903230
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) - int((a-1)/x)) else: print(int(b/x) - int((a-1)/x)-1)
p03861
s683467198
Wrong Answer
a, b, x = map(int, input().split()) count = 0 if a % x == 0 or b % x == 0: print((b-a)//x + 1) else: print((b-a)//x)
p03861
s881652842
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)) print(int(b/x) - int((a-1)/x))
p03861
s073010997
Wrong Answer
a,b,x = map(int,input().split()) if a % x == 0 and b % x == 0 and x != 1: print(((b-a+1)//x)+1) else: print(((b-a+1)//x))
p03861
s422371335
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): ans += 1 print(int(ans))
p03861
s456712339
Wrong Answer
a, b, x = list(map(int, input().split())) if a == b: print(0) elif a%x == 0 or b%x == 0: print((b//x)-(a//x)+1) else: print((b//x)-(a//x))
p03861
s838857525
Wrong Answer
a, b, c = map(int, input().split()) for i in range(a,b): if i % c == 0: k = i print(1 + (b - k) // c) break else: continue else: print(0)
p03861
s345936261
Wrong Answer
a,b,x = map(int, input().split()) count=0 for i in range(b-a+1): if b<x : break if i<x-a : i=x-a if (a+i)%x == 0 : count+=1 count+=(b-a-i)//x break print(count)
p03861
s612343823
Wrong Answer
a,b,x = map(int,input().split()) A = a//x B = b//x if a%x==0 or b%x==0: print(B-A+1) else:print(B-A)
p03861
s755803630
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
s421151285
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_amari = a % x b_amari = b % x ans = (b - a) / x if ((a_amari + b_amari) % x == 0): ans += 1 print(int(ans))
p03861
s388422558
Wrong Answer
a = input().split(" ") b = int(a[1]) x = int(a[2]) a = int(a[0]) print(int((b - a + 1) // x))
p03861
s202990804
Wrong Answer
a, b, x = map(int, input().split()) d=(b-a)//x if a%x==0 and b%x==0: d=d+1 print(d) else: print(d)
p03861
s179641362
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
s045104245
Wrong Answer
a,b,c = map(int, input().split()) if a == 0: print((b - a) // c + 1) else: print((b - a) // c)
p03861
s385029449
Wrong Answer
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
s639760204
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
s709058158
Wrong Answer
a,b,x = map(int, input().split()) count=0 if a<x : ai = x else: ai = (a//x+1)*x if ai<=b : count+=1 count+=(b-ai+1)//x print(count)
p03861
s750360662
Wrong Answer
a,b,x=map(int,input().split()) import math ta=math.ceil(a/x) if abs(a-ta*x)>x: ta=ta+1 tb=b//x ans=tb-ta+1 print(ans)
p03861
s250752343
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
s034639911
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: ans += 1 print(ans)
p03861
s274985161
Wrong Answer
import numpy as np a, b, x = map(int, input().split()) if (a!= 0 and a % x == 0) or (b!= 0 and b % x == 0): print((b-a)//x + 1) else: print((b-a)//x)
p03861
s368361901
Wrong Answer
a,s,d=map(int,input().split()) print(s//d-max((a-1)//d, 0 ))
p03861
s317142717
Wrong Answer
a, b, x = map(int, input().split()) print(b // x - max(0, a - 1) // x + 1 if a == 0 else 0) # aใŒ0ใฎใจใใฉใ†ใ™ใ‚Šใ‚ƒใ„ใ„ใฎใ‹็›ดๆ„ŸใงใฏใพใฃใŸใใ‚ใ‹ใ‚‰ใ‚“ใฎใ ใŒ
p03861
s177639455
Wrong Answer
a,b,x=map(int,input().split()) p=a+(x-(a%x))if a%x==0 else a q=b-(b%x) ans =1+(q-p)//x print(ans)
p03861
s902341295
Wrong Answer
import math a,b,x = map(int,input().split()) s = math.floor(b / x) if a == 0: print(s + 1) else: k = math.floor((a - 1) / x) print(s - k)
p03861
s867704092
Wrong Answer
a, b, x = map(int,input().split()) r = 0 if ((a // x) + 1) * x > b: r = 0 else: if a % x == 0: a_t = a else: a_t = ((a // x) + 1) * x a_b = b - a_t if a_b == 0: print(1) else: r = (a_b // x) + 1 print(int(r))
p03861
s038951324
Wrong Answer
a, b, x = map(int, input().split()) count = 0 if a == 0: count = int(b/x + 1) else: count = int(b/x + 1 - ((a - 1)/x + 1)) print(count)
p03861
s592252038
Wrong Answer
import collections #ๆ–‡ๅญ—ๅˆ—ใ‚’ไธ€ๆ–‡ๅญ—ใšใคๅ–ๅพ—ใ—ใŸใ„ใจใ def inputStrOnebyOne(): s = list(input()) return s #ๆ•ดๆ•ฐใ‚’ไธ€ใคใšใคใƒชใ‚นใƒˆใซๅ…ฅใ‚Œใ‚‹ def inputOnebyOne_Int(): a = list(int(x) for x in input().split()) return a def main(): a, b, x = map(int, input().split()) ret = 0 if b-a != 0: ret = int(b//x-((a-1)//x)) print(ret) if __name__=='__main__': main()
p03861
s272841587
Wrong Answer
a, b, x = map(int, input().split()) ans = 0 p = a while p <= b: if p%x == 0: break p += 1 ans = ((b-p)/x) + 1 print(ans)
p03861
s752573817
Wrong Answer
a, b, x = map(int, input().split()) re = (b-a) if a%x == 0 and b%x == 0: print((re//x)+1) else: print(re//x)
p03861
s834127393
Wrong Answer
a,b,x = map(int, input().split()) print(b//x - a//x)
p03861
s398870993
Wrong Answer
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 0 bcnt = b // x if b > 0 else 0 ans = bcnt - acnt print(ans)
p03861
s339169570
Wrong Answer
data = [int(i) for i in input().split(" ")] total = 0 if data[0] != data[1]: for i in range(data[0],data[1]+1): total += 1 print(total)
p03861
s273988449
Wrong Answer
a, b, x = map(int, input().split()) p = 0 for i in range(1,b//x): if a < x*i: p = x*i break if p != 0: t = b-p s = t//x ans = s + 1 print(t,s) print(ans) else: print(0)
p03861
s757566036
Wrong Answer
#!/usr/bin/env python a, b, x = map(int, input().split()) if a == b: print(0) exit() if a%x == 0 and b%x == 0: ans = b//x - a//x + 1 print(ans) exit() if a%x != 0 and b%x != 0: ans = b//x - a//x print(ans) exit() if a%x == 0 and b%x != 0: ans = b//x - a//x + 1 print(ans) exit() ans = b//x - a//x print(ans)
p03861
s176388045
Wrong Answer
from decimal import * a, b, x = map(int, input().split()) dif = Decimal(b) - Decimal(a) ans = dif // Decimal(x) if Decimal(a) % Decimal(x) == 0: ans += 1 print(ans)
p03861
s279077011
Wrong Answer
a, b, x = map(int, input().split()) def count(a, b, x): m = b // x + 1 n = 0 if a != 0: n = a // x + 1 return m - n print(count(a, b, x))