s_id stringlengths 10 10 | p_id stringlengths 6 6 | u_id stringlengths 10 10 | date stringlengths 10 10 | language stringclasses 1
value | original_language stringclasses 11
values | filename_ext stringclasses 1
value | status stringclasses 1
value | cpu_time stringlengths 1 5 | memory stringlengths 1 7 | code_size stringlengths 1 6 | code stringlengths 1 539k |
|---|---|---|---|---|---|---|---|---|---|---|---|
s337166162 | p03860 | u500297289 | 1549789409 | Python | Python (3.4.3) | py | Runtime Error | 18 | 2940 | 78 | """ AtCoder """
A, s, C = map(int, input().split())
print('A' + s[0] + 'C')
|
s601520664 | p03860 | u513793759 | 1547596282 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 117 | a,b,x = map(int, input().split())
T = []
for i in range(a,b+1):
if i%x==0:
T.append(i)
else:
quit
print(len(T)) |
s675629113 | p03860 | u231647664 | 1547518116 | Python | Python (3.4.3) | py | Runtime Error | 18 | 2940 | 123 | a, b, c = map(int, input().split())
modb = []
for n in range(a, b+1):
if n % c == 0:
modb.append(n)
print(len(modb))
|
s409442521 | p03860 | u740284863 | 1546568555 | Python | Python (3.4.3) | py | Runtime Error | 18 | 2940 | 55 | a,b,x = map(int,input().split())
print(b // x - a //x) |
s583183289 | p03860 | u089032001 | 1546299873 | Python | Python (3.4.3) | py | Runtime Error | 18 | 2940 | 58 | A, B, C = map(int, input().split())
print(A[0]+B[0]+C[0]) |
s394840603 | p03860 | u060936992 | 1545527857 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 142 | #
a,b,x=map(int,input().split())
c=b-a
d=int(c/1e15)
e=int(c-d*1e15)
#print(d,e,c)
if a%x==0 and b%x==0:
print(d+1)
else:
print(d)
|
s419724582 | p03860 | u060936992 | 1545527834 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 142 | #
a,b,x=map(int,input().split())
c=b-a
d=int(c/1e15)
e=int(c-d*1e15)
#print(d,e,c)
if a%x==0 and b%x==0:
print(d+1)
else:
print(d)
|
s821585011 | p03860 | u439392790 | 1545413068 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 61 | a,b,c=map(str,input().split())
s=list[b]
print("A"+s[0]+"C")
|
s361152622 | p03860 | u439392790 | 1545413034 | Python | Python (3.4.3) | py | Runtime Error | 19 | 2940 | 57 | a,b,c=map(input().split())
s=list[b]
print("A"+s[0]+"C")
|
s607188270 | p03860 | u439392790 | 1545412924 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 57 | a,b,c=map(input().split())
s=list[b]
print("A"+b[0]+"C")
|
s478404389 | p03860 | u439392790 | 1545412840 | Python | Python (3.4.3) | py | Runtime Error | 18 | 2940 | 63 | a,b,c=map(int,input().split())
s=list(b)
print("a"+"b[0]"+"c")
|
s524882982 | p03860 | u439392790 | 1545412734 | Python | Python (3.4.3) | py | Runtime Error | 18 | 2940 | 56 | a,b,c=map(int,input().split())
s=list[b]
print(a+b[0]+c) |
s209178637 | p03860 | u272377260 | 1544891909 | Python | Python (3.4.3) | py | Runtime Error | 18 | 2940 | 75 | s = input().replace('AtCoder ').replace(' Contest')
print('A' + s[0] + 'C') |
s332468526 | p03860 | u371467115 | 1544818733 | Python | Python (3.4.3) | py | Runtime Error | 18 | 2940 | 65 | a,b,c=list(input().split())
u=[[a],[b],[c]]
print(a(0)+b(0)+c(0)) |
s351771610 | p03860 | u844789719 | 1543372407 | Python | Python (3.4.3) | py | Runtime Error | 18 | 2940 | 98 | if sorted([int(_) for _ in input().split()]) == [5, 5, 7]:
print('YES')
else:
print('NO')
|
s738151223 | p03860 | u369212307 | 1542148990 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3060 | 257 | a, b, x = map(int, input().split())
ans = 0
def fanc(n, x):
if n == -1:
f = 0
else:
f = n // (x + 1) # 切り捨て除算//を使うとint同士ならintで返してくれるから楽
return f
print(fanc(b, x) - fanc(a - 1, x)) |
s936715005 | p03860 | u369212307 | 1542148955 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3060 | 279 | a, b, x = map(int, input().split())
ans = 0
def fanc(n, x):
if n == -1:
f = 0
else:
f = n // x + 1
# 切り捨て除算//を使うとint同士ならintで返してくれるから楽
return f
print(fanc(b, x) - fanc(a - 1, x)) |
s976600325 | p03860 | u369212307 | 1542148840 | Python | Python (3.4.3) | py | Runtime Error | 19 | 2940 | 254 | a, b, x = map(int, input().split())
ans = 0
def fanc(n, x):
if n == -1:
f = 0
else:
f = n // x + 1 # 切り捨て除算//を使うとint同士ならintで返してくれるから楽
return f
print(fanc(b, x) - fanc(a - 1, x)) |
s696106827 | p03860 | u637824361 | 1540854366 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 30 | S = input()
print'A%sC' % s[0] |
s018876706 | p03860 | u729133443 | 1540718743 | Python | Python (2.7.6) | py | Runtime Error | 10 | 2568 | 22 | print'A%sC'%input()[8] |
s795560622 | p03860 | u459697504 | 1539475465 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3060 | 398 | #! /usr/bin/python3
# Between a and b ...
"""
非負の整数 a, b (a≤b) と、正の整数 x が与えられます。
a 以上 b 以下の整数のうち、x で割り切れるものの個数を求めてください。
"""
test_mode = False
a, b, x = map(int, input().split())
counter = 0
limit = b // x
for n in range(1, limit+1):
if a <= x*n <= b:
counter += 1
print(counter)
|
s908165528 | p03860 | u940102677 | 1538427911 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 43 | a,b,c=input().split();ptint(a[0]+b[0]+c[0]) |
s379382818 | p03860 | u138486156 | 1535940470 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3060 | 360 | a,b,x = map(int, input().split())
if x == 1:
ans = b-a+1
else:
if a < b:
if a % x == 0 and b % x == 0:
ans = (b-a)//x + 1
elif a % x == 0 or b % x == 0:
ans = (b-a+1)//x + 1
else:
ans = (b-a+1)//x
else:
if a % x:
ans = 0
else:
ans = 1
print(ans)
|
s771066909 | p03860 | u699994820 | 1534770167 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 65 | #1
x,y,z = map(int, input().split())
print(int(y/z)-int((x-1)/z)) |
s579798338 | p03860 | u699994820 | 1534770038 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 43 | #2
n = int(input())
print(int(n**(1/2))**2) |
s473146714 | p03860 | u277802731 | 1534126192 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 66 | a = list(input().split())
ans = a[0][0]+b[0][0]+c[0][0]
print(ans) |
s618633682 | p03860 | u419686324 | 1532570595 | Python | Python (3.4.3) | py | Runtime Error | 19 | 3188 | 77 | import re
s = input()
print("A%sC" % re.match('AtCoder (.).* Contest', s)[1]) |
s854891268 | p03860 | u004025573 | 1532544458 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 109 | s=list(map(str,input().split()))
print(''.join([s[0][0],s[1][0],s[2][0]]))s=list(map(int,input().split()))
|
s560284379 | p03860 | u627417051 | 1531436684 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 109 | a, b, x = list(map(int, input().split()))
A = a // x
B = b // x
c = 0
if a % x == 0:
c += 1
print(B - A + c) |
s482273602 | p03860 | u503901534 | 1524802355 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 89 | s = list(map(str,input().split()))
t = (list(s[1])).capitalize()
print('A' + t + 'C') |
s120272464 | p03860 | u503901534 | 1524802310 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 83 | s = list(map(str,input().split()))
t = (list(s[1])).capitalize()
print(A + t + C) |
s204002429 | p03860 | u218843509 | 1524286713 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 133 | a, b, x = list(map(int, input().split()))
ans = 0
for i in range(a, b + 1):
if i % x == 0:
ans += 1
print(ans)
|
s819796566 | p03860 | u127856129 | 1521469604 | Python | Python (3.4.3) | py | Runtime Error | 18 | 2940 | 86 | a,b,c=input()
e=list(input(a))
f=list(input(b))
g=list(input(c))
print(e[0]+f[0]+g[0]) |
s818285229 | p03860 | u127856129 | 1521469577 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3188 | 86 | a,b,c=input()
e=list(input(a))
f=list(input(b))
g=list(input(c))
print(e[0],f[0],g[0]) |
s654404224 | p03860 | u127856129 | 1521469490 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 41 | a,b,c=list(input())
print(a[0],b[0],c[0]) |
s031800308 | p03860 | u597436499 | 1520117754 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 121 | a, b, x = map(int, input().split())
fb = b // x
if a == 0:
fb += 1
fa = 0
else:
fa = (a-1) // x
print(fb-fa)
|
s909985892 | p03860 | u597436499 | 1520117255 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 109 | a, b, x = map(int, input().split())
fb = b // x
if a == 0:
fa = 0
else:
fa = (a-1) // x
print(fb-fa)
|
s689852164 | p03860 | u225528554 | 1512871847 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3056 | 189 | def main():
r = list(map(int,input().split(" ")))
n = input()
if r[1] >= len(n) >= r[0]:
print("YES")
else:
print("NO")
if __name__ == "__main__":
main() |
s490970773 | p03860 | u750032608 | 1512331663 | Python | Python (2.7.6) | py | Runtime Error | 10 | 2568 | 86 | s = str(raw_input())
b, c, d = map(str, raw_input().split())
print 'A' + c[0] + 'C'
|
s973333594 | p03860 | u663710122 | 1506618638 | Python | Python (3.4.3) | py | Runtime Error | 20 | 2940 | 44 | S = input().split()
print('A' + S[8] + 'C')
|
s202446793 | p03860 | u163892325 | 1491788074 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 139 | a1, b1, c1 = input().split()
a = int(a1)
b = int(b1)
c = int(c1)
z = 0
for i in range(a,b+1):
if i % c == 0:
z += 1
print (z) |
s616786008 | p03860 | u057586044 | 1491693719 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 130 | a, b, c = map(int, input() .split())
e = []
for i in range(a, b+1):
d = i % c
if d == 0:
e.append(i)
print(len(e)) |
s867698133 | p03860 | u976966750 | 1490136957 | Python | PyPy2 (5.6.0) | py | Runtime Error | 34 | 27756 | 101 |
a,b,x=map(int,raw_input().split())
if a%x!=0:
print (b/x)-(a/x)
else:
print ((b/x)-(a/x))+1 |
s328705656 | p03860 | u327543932 | 1485556976 | Python | Python (2.7.6) | py | Runtime Error | 16 | 2568 | 123 | a,b,x=map(int,raw_input().split())
y=b/x-a/x
print (y)
"""
for i in range(a,b+1):
if i % x ==0:
print (i+1)
""" |
s992900220 | p03860 | u327543932 | 1485556856 | Python | Python (2.7.6) | py | Runtime Error | 18 | 2568 | 123 | a,b,x=map(int,raw_input().split())
y=b/x-a/x
print (y)
"""
for i in range(a,b+1):
if i % x ==0:
print (i+1)
""" |
s082134602 | p03860 | u348405655 | 1485543342 | Python | Python (3.4.3) | py | Runtime Error | 24 | 3064 | 152 | a, b, x = map(int,input().split())
N = 0
if a%x ==0:
N = int((b-a)//x)+1
else:
c = a + (x-a%x)
if b>=c:
N = int((b-c)//x)+1
print(N) |
s610379426 | p03860 | u327543932 | 1485536077 | Python | Python (2.7.6) | py | Runtime Error | 17 | 2696 | 105 | a,b,x=map(int,raw_input().split())
y = 0
for i in range(a,b+1):
if i % x ==0:
y=y+1
print (y) |
s938156802 | p03860 | u045939752 | 1483724868 | Python | Python (3.4.3) | py | Runtime Error | 25 | 3188 | 70 | a, b, x = map(int, input().split())
a -= 1
print ((b // x) - (a // x)) |
s088508902 | p03860 | u986399983 | 1481777983 | Python | Python (2.7.6) | py | Runtime Error | 17 | 2568 | 65 | s = raw_input().split()
print [s[0][0], s[1]][0], s[2][0]].join() |
s454393616 | p03860 | u317493066 | 1481636077 | Python | Python (3.4.3) | py | Runtime Error | 23 | 3064 | 155 | # -*- coding:utf-8 -*-
a, b, x = map(int, input().split())
count = 0
for i in range(a, b+1):
if i % x == 0:
count = count + 1
print(count)
|
s859600604 | p03860 | u697695018 | 1481508685 | Python | Python (2.7.6) | py | Runtime Error | 16 | 2568 | 105 | a, b, x= map(int, raw_input().split())
if a%x == 0:
print b//x - a//x +1
else:
print b//x - a//x |
s636811702 | p03860 | u886545507 | 1481465761 | Python | Python (2.7.6) | py | Runtime Error | 17 | 2568 | 99 | ABC048B
a,b,x=map(int,raw_input().split())
res=b/x
if a!=0:
res-=(a-1)/x
else:
res+=1
print res
|
s441184726 | p03860 | u231928431 | 1481294271 | Python | Python (2.7.6) | py | Runtime Error | 16 | 2696 | 46 | s=raw_input().sprit(' ')
print 'A'+s[1][0]+'C' |
s093843163 | p03860 | u261935209 | 1481235885 | Python | Python (3.4.3) | py | Runtime Error | 28 | 3444 | 268 | import random
def main():
s = list(input())
count = 0
while True:
idx = random.randint(0,len(s-1))
if s[idx] == s[idx+1] or s[idx] == s[idx-1]:
break
count += 1
if count%2==0:
print("First")
else:
print("Second")
if __name__ == '__main__':
main() |
s688945730 | p03860 | u012693733 | 1481189067 | Python | Python (2.7.6) | py | Runtime Error | 17 | 2568 | 152 | # -*- coding: utf-8 -*-
a, b, x = map(int,raw_input().split())
cnt = 0
for i in range(a,b+1):
if i % x == 0:
cnt = cnt + 1
print int(cnt) |
s412932452 | p03860 | u012693733 | 1481188920 | Python | Python (2.7.6) | py | Runtime Error | 17 | 2568 | 150 | # -*- coding: utf-8 -*-
a, b, x = map(int,raw_input().split())
cnt = 0
for i in range(a,b):
if i % x == 0:
cnt = cnt + 1
print int(cnt) |
s601736419 | p03860 | u012693733 | 1481188621 | Python | Python (2.7.6) | py | Runtime Error | 17 | 2568 | 125 |
a, b, x = map(int,raw_input().split())
cnt = 0
for i in range(a,b):
if i % x = 0:
cnt = cnt + 1
print int(cnt) |
s742422945 | p03860 | u697695018 | 1481153514 | Python | Python (2.7.6) | py | Runtime Error | 17 | 2568 | 86 | input_list = raw_input.split()
output = x[0] for x in input_list
print ''.join(output) |
s777048620 | p03860 | u697695018 | 1481153053 | Python | Python (2.7.6) | py | Runtime Error | 16 | 2568 | 114 | input_line1 = raw_input()
input_list = input_line1.split()
output = x[0] for x in input_list
print ''.join(output) |
s312373402 | p03860 | u697695018 | 1481152948 | Python | Python (3.4.3) | py | Runtime Error | 22 | 3064 | 114 | input_line1 = raw_input()
input_list = input_line1.split()
output = x[0] for x in input_list
print ''.join(output) |
s636018999 | p03860 | u063795452 | 1481085914 | Python | Python (3.4.3) | py | Runtime Error | 22 | 3064 | 200 |
def count():
a, b, x = map(int, input().split())
count = 0
for i in range(a, b+1):
if i % x == 0:
count += 1
print(count)
if __name__ == "__main__":
count() |
s406595473 | p03860 | u063795452 | 1481085734 | Python | Python (3.4.3) | py | Runtime Error | 23 | 3064 | 202 |
def count():
a, b, x = map(int, input().split())
count = 0
for i in range(a, b+1):
if i % x == 0:
count += 1
print(count)
if __name__ == "__main__":
count()
|
s346315973 | p03860 | u117629640 | 1480979487 | Python | Python (3.4.3) | py | Runtime Error | 24 | 3064 | 92 | a, b, c = map(int, input().split())
d = 0
if a == 0:
d = 1
print(int((b - a) / c + d)) |
s490891974 | p03860 | u886790158 | 1480955595 | Python | Python (3.4.3) | py | Runtime Error | 23 | 3064 | 236 |
N, x = list(map(int, input().split()))
a = list(map(int, input().split()))
ans = 0
def need_to_eat(a, i):
return a[i] + a[i+1] > x
for i in range(N-1):
while need_to_eat(a, i):
a[i] -= 1
ans += 1
print(ans)
|
s019064979 | p03860 | u781758937 | 1480914598 | Python | Python (3.4.3) | py | Runtime Error | 23 | 3064 | 374 | N, x = map(int, input().split())
a = [int(j) for j in input().split()]
count = 0
for i in range(N-1):
dif = a[i] + a[i+1] - x
if dif > x:
if a[i+1] >x:
count += dif
a[i+1] -= dif
else:
count += dif
a[i] -= dif - a[i + 1]
a[i + 1] = 0
print(count)
|
s715156683 | p03860 | u781758937 | 1480914416 | Python | Python (3.4.3) | py | Runtime Error | 24 | 3064 | 373 | N, x = map(int, input().split())
a = [int(j) for j in input().split()]
count = 0
for i in range(N-1):
dif = a[i] + a[i+1] - x
if dif > x:
if a[i+1] >x:
count += dif
a[i+1] -= dif
else:
count += dif
a[i] -= dif - a[i + 1]
a[i + 1] = 0
print(count)
|
s262065982 | p03860 | u781758937 | 1480913340 | Python | Python (3.4.3) | py | Runtime Error | 23 | 3064 | 549 | N, x = map(int, input().split())
a = input().split()
count = 0
for i in range(len(a)):
a[i] = int(a[i])
if a[i] > x:
count = count + a[i] - x
a[i] = x
else:
a[i] = a[i]
for i in range(len(a)-1):
if i%2 == 0:
if a[i] + a[i + 1] > x:
count = count + a[i] + a[i + 1] - x
a[i+1] = x - a[i]
else:
if a[i] + a[i + 1] > x:
count = count + a[i] + a[i + 1] - x
a[i] = x - a[i + 1]
print(count)
|
s420100106 | p03860 | u781758937 | 1480913242 | Python | Python (3.4.3) | py | Runtime Error | 26 | 3064 | 550 | N, x = map(int, input().split())
a = input().split()
count = 0
for i in range(len(a)):
a[i] = int(a[i])
if a[i] > x:
count = count + a[i] - x
a[i] = x
else:
a[i] = a[i]
for i in range(len(a)-1):
if i%2 == 0:
if a[i] + a[i + 1] > x:
count = count + a[i] + a[i + 1] - x
a[i+1] = x - a[i]
else:
if a[i] + a[i + 1] > x:
count = count + a[i] + a[i + 1] - x
a[i] = x - a[i + 1]
print(count)
|
s932297597 | p03860 | u227254381 | 1480910656 | Python | Python (2.7.6) | py | Runtime Error | 16 | 2696 | 82 | a, b, x = map(int, input().split())
c = b//x
d = (a-1)// x
ans = c-d
print(ans)
|
s688548056 | p03860 | u024804656 | 1480909560 | Python | Python (3.4.3) | py | Runtime Error | 23 | 3064 | 423 | st = input().split()
N = int(st[0])
x = int(st[1])
A = input().split()
a = []
for i in range(N):
a.append(int(A[i]))
a.append(0)
a.append(0)
ret = 0
for i in range(N):
if a[i] + a[i + 1] > x :
d1 = max((a[i] + a[i + 1]) - x,0)
ret += min(a[i+1],d1)
a[i+1] -= min(a[i+1],d1)
d1 = max((a[i] + a[i + 1]) - x,0)
ret += min(a[i],d1)
a[i] -= min(a[i],d1)
print(ret) |
s349976945 | p03860 | u886950742 | 1480908366 | Python | Python (3.4.3) | py | Runtime Error | 22 | 3064 | 81 | # -*- coding: utf-8 -*-
args = sys.argv
st = args[1]
at = 'A'+st[0]+'C'
print at |
s626501961 | p03860 | u886950742 | 1480908275 | Python | Python (3.4.3) | py | Runtime Error | 23 | 3064 | 48 | args = sys.argv
st = args[1]
print 'A'+st[0]+'C' |
s367192025 | p03860 | u886950742 | 1480908130 | Python | Python (3.4.3) | py | Runtime Error | 22 | 3064 | 44 | args = sys.argv
print "A" + args[1][0] + "C" |
s721040148 | p03860 | u882200107 | 1480907190 | Python | Python (3.4.3) | py | Runtime Error | 22 | 3064 | 79 | # coding: utf-8
a,b,x = tuple(map(int, input().split()))
print(b//x - (a-1)//x) |
s103592141 | p03860 | u882200107 | 1480907105 | Python | Python (3.4.3) | py | Runtime Error | 23 | 3192 | 72 | # coding: utf-8
a,b,x = map(int, input().split())
print(b//x - (a-1)//x) |
s502414122 | p03860 | u353311466 | 1480905135 | Python | Python (2.7.6) | py | Runtime Error | 16 | 2568 | 130 | import math;
a,b,x = map(long, raw_input().split());
if(a%x == 0):
a-=1;
A = long(math.ceil(a/x));
B = long(b//x);
print(B-A); |
s493770715 | p03861 | u317508154 | 1600220467 | Python | Python (3.8.2) | py | Runtime Error | 29 | 8948 | 57 | a,b,x = map(int,input().split())
print((b - a) // x) |
s354226051 | p03861 | u666550725 | 1599878864 | Python | PyPy3 (7.3.0) | py | Runtime Error | 98 | 74860 | 54 | a, b, x = input().split()
print(b // x - (a - 1) // x) |
s937879446 | p03861 | u708211626 | 1599495145 | Python | Python (3.8.2) | py | Runtime Error | 25 | 8932 | 90 | a,b,c=map(int,input().split())
s=0
for i in range(a:b):
if i%2==0:
s+=1
print(s) |
s002660256 | p03861 | u739843002 | 1598136536 | Python | Python (3.8.2) | py | Runtime Error | 29 | 9212 | 1821 | def delete_head_zeros(n):
n = str(n)
l = len(n)
if "." in n:
l = n.find(".")
head_zeros = 0
for i in range(l - 1):
if n[i] == "0":
head_zeros += 1
return n[head_zeros:]
def bigint_compare(a, b):
a = delete_head_zeros(a)
b = delete_head_zeros(b)
if len(a) > len(b):
return 1
elif len(a) < len(b):
return -1
else:
if a > b:
return 1
elif a < b:
return -1
else:
return 0
def bigint_plus(a, b):
a = str(a)
b = str(b)
d = max([len(a), len(b)])
a = '0' * (d - len(a)) + a
b = '0' * (d - len(b)) + b
ans = ""
carry = 0
for i in range(d):
s = int(a[-i-1]) + int(b[-i-1]) + carry
carry = s // 10
ans = str(s % 10) + ans
else:
if carry:
ans = str(carry) + ans
return ans
def bigint_minus(a, b):
a = str(a)
b = str(b)
M = []
m = []
sign = ""
if len(a) > len(b) or (len(a) == len(b) and a >= b):
[M, m] = [a, b]
else:
[M, m] = [b, a]
sign = "-"
m = '0' * (len(M) - len(m)) + m
ans = ""
borrow = 0
for i in range(len(M)):
s = int(M[-i-1]) - int(m[-i-1]) - borrow
if s < 0:
borrow = 1
s += 10
else:
borrow = 0
ans = str(s) + ans
return sign + delete_head_zeros(ans)
def bigint_divide(a, b, d = 0):
a = str(a)
b = str(b)
d = int(d)
if d < 0:
d = 0
ans = ""
r = ""
for i in range(len(a) + d):
q = 0
if i < len(a):
r += a[i]
elif i == len(a):
ans += "."
r += "0"
else:
r += "0"
if bigint_compare(r, b) == -1:
ans += str(q)
else:
while bigint_compare(r, b) >= 0:
r = bigint_minus(r, b)
q += 1
ans += str(q)
return delete_head_zeros(ans)
a, b, x = [n for n in input().split(" ")]
c1 = bigint_divide(b, x)
if int(a) == 0:
c2 = 0
else:
c2 = bigint_divide(bigint_minus(a, 1), x)
if int(a) == 0:
print(bigint_plus(bigint_minus(c1, c2), 1))
else:
print(bigint_minus(c1, c2))
|
s644882563 | p03861 | u739843002 | 1598136352 | Python | Python (3.8.2) | py | Runtime Error | 30 | 9356 | 1767 | def delete_head_zeros(n):
n = str(n)
l = len(n)
if "." in n:
l = n.find(".")
head_zeros = 0
for i in range(l - 1):
if n[i] == "0":
head_zeros += 1
return n[head_zeros:]
def bigint_compare(a, b):
a = delete_head_zeros(a)
b = delete_head_zeros(b)
if len(a) > len(b):
return 1
elif len(a) < len(b):
return -1
else:
if a > b:
return 1
elif a < b:
return -1
else:
return 0
def bigint_plus(a, b):
a = str(a)
b = str(b)
d = max([len(a), len(b)])
a = '0' * (d - len(a)) + a
b = '0' * (d - len(b)) + b
ans = ""
carry = 0
for i in range(d):
s = int(a[-i-1]) + int(b[-i-1]) + carry
carry = s // 10
ans = str(s % 10) + ans
else:
if carry:
ans = str(carry) + ans
return ans
def bigint_minus(a, b):
a = str(a)
b = str(b)
M = []
m = []
sign = ""
if len(a) > len(b) or (len(a) == len(b) and a >= b):
[M, m] = [a, b]
else:
[M, m] = [b, a]
sign = "-"
m = '0' * (len(M) - len(m)) + m
ans = ""
borrow = 0
for i in range(len(M)):
s = int(M[-i-1]) - int(m[-i-1]) - borrow
if s < 0:
borrow = 1
s += 10
else:
borrow = 0
ans = str(s) + ans
return sign + delete_head_zeros(ans)
def bigint_divide(a, b, d = 0):
a = str(a)
b = str(b)
d = int(d)
if d < 0:
d = 0
ans = ""
r = ""
for i in range(len(a) + d):
q = 0
if i < len(a):
r += a[i]
elif i == len(a):
ans += "."
r += "0"
else:
r += "0"
if bigint_compare(r, b) == -1:
ans += str(q)
else:
while bigint_compare(r, b) >= 0:
r = bigint_minus(r, b)
q += 1
ans += str(q)
return delete_head_zeros(ans)
a, b, x = [n for n in input().split(" ")]
c1 = bigint_divide(b, x)
if int(a) == 0:
c2 = 0
else:
c2 = bigint_divide(bigint_minus(a, 1), x)
print(bigint_plus(bigint_minus(c1, c2), 1))
|
s268266190 | p03861 | u739843002 | 1598136141 | Python | Python (3.8.2) | py | Runtime Error | 29 | 9272 | 1399 | def delete_head_zeros(n):
n = str(n)
l = len(n)
if "." in n:
l = n.find(".")
head_zeros = 0
for i in range(l - 1):
if n[i] == "0":
head_zeros += 1
return n[head_zeros:]
def bigint_compare(a, b):
a = delete_head_zeros(a)
b = delete_head_zeros(b)
if len(a) > len(b):
return 1
elif len(a) < len(b):
return -1
else:
if a > b:
return 1
elif a < b:
return -1
else:
return 0
def bigint_minus(a, b):
a = str(a)
b = str(b)
M = []
m = []
sign = ""
if len(a) > len(b) or (len(a) == len(b) and a >= b):
[M, m] = [a, b]
else:
[M, m] = [b, a]
sign = "-"
m = '0' * (len(M) - len(m)) + m
ans = ""
borrow = 0
for i in range(len(M)):
s = int(M[-i-1]) - int(m[-i-1]) - borrow
if s < 0:
borrow = 1
s += 10
else:
borrow = 0
ans = str(s) + ans
return sign + delete_head_zeros(ans)
def bigint_divide(a, b, d = 0):
a = str(a)
b = str(b)
d = int(d)
if d < 0:
d = 0
ans = ""
r = ""
for i in range(len(a) + d):
q = 0
if i < len(a):
r += a[i]
elif i == len(a):
ans += "."
r += "0"
else:
r += "0"
if bigint_compare(r, b) == -1:
ans += str(q)
else:
while bigint_compare(r, b) >= 0:
r = bigint_minus(r, b)
q += 1
ans += str(q)
return delete_head_zeros(ans)
a, b, x = [n for n in input().split(" ")]
c1 = bigint_divide(b, x)
c2 = bigint_divide(bigint_minus(a, 1), x)
print(bigint_minus(c1, c2))
|
s308369163 | p03861 | u739843002 | 1598136060 | Python | Python (3.8.2) | py | Runtime Error | 30 | 9368 | 1404 | def delete_head_zeros(n):
n = str(n)
l = len(n)
if "." in n:
l = n.find(".")
head_zeros = 0
for i in range(l - 1):
if n[i] == "0":
head_zeros += 1
return n[head_zeros:]
def bigint_compare(a, b):
a = delete_head_zeros(a)
b = delete_head_zeros(b)
if len(a) > len(b):
return 1
elif len(a) < len(b):
return -1
else:
if a > b:
return 1
elif a < b:
return -1
else:
return 0
def bigint_minus(a, b):
a = str(a)
b = str(b)
M = []
m = []
sign = ""
if len(a) > len(b) or (len(a) == len(b) and a >= b):
[M, m] = [a, b]
else:
[M, m] = [b, a]
sign = "-"
m = '0' * (len(M) - len(m)) + m
ans = ""
borrow = 0
for i in range(len(M)):
s = int(M[-i-1]) - int(m[-i-1]) - borrow
if s < 0:
borrow = 1
s += 10
else:
borrow = 0
ans = str(s) + ans
return sign + delete_head_zeros(ans)
def bigint_divide(a, b, d = 0):
a = str(a)
b = str(b)
d = int(d)
if d < 0:
d = 0
ans = ""
r = ""
for i in range(len(a) + d):
q = 0
if i < len(a):
r += a[i]
elif i == len(a):
ans += "."
r += "0"
else:
r += "0"
if bigint_compare(r, b) == -1:
ans += str(q)
else:
while bigint_compare(r, b) >= 0:
r = bigint_minus(r, b)
q += 1
ans += str(q)
return delete_head_zeros(ans)
a, b, x = [n for n in input().split(" ")]
c1 = bigint_divide(b, x, 1)
c2 = bigint_divide(bigint_minus(a, 1), x, 1)
print(bigint_minus(c1, c2)) |
s826453657 | p03861 | u739843002 | 1598136035 | Python | Python (3.8.2) | py | Runtime Error | 25 | 9192 | 1403 | def delete_head_zeros(n):
n = str(n)
l = len(n)
if "." in n:
l = n.find(".")
head_zeros = 0
for i in range(l - 1):
if n[i] == "0":
head_zeros += 1
return n[head_zeros:]
def bigint_compare(a, b):
a = delete_head_zeros(a)
b = delete_head_zeros(b)
if len(a) > len(b):
return 1
elif len(a) < len(b):
return -1
else:
if a > b:
return 1
elif a < b:
return -1
else:
return 0
def bigint_minus(a, b):
a = str(a)
b = str(b)
M = []
m = []
sign = ""
if len(a) > len(b) or (len(a) == len(b) and a >= b):
[M, m] = [a, b]
else:
[M, m] = [b, a]
sign = "-"
m = '0' * (len(M) - len(m)) + m
ans = ""
borrow = 0
for i in range(len(M)):
s = int(M[-i-1]) - int(m[-i-1]) - borrow
if s < 0:
borrow = 1
s += 10
else:
borrow = 0
ans = str(s) + ans
return sign + delete_head_zeros(ans)
def bigint_divide(a, b, d = 0):
a = str(a)
b = str(b)
d = int(d)
if d < 0:
d = 0
ans = ""
r = ""
for i in range(len(a) + d):
q = 0
if i < len(a):
r += a[i]
elif i == len(a):
ans += "."
r += "0"
else:
r += "0"
if bigint_compare(r, b) == -1:
ans += str(q)
else:
while bigint_compare(r, b) >= 0:
r = bigint_minus(r, b)
q += 1
ans += str(q)
return delete_head_zeros(ans)
a, b, x = [n for n in input().split(" ")]
c1 = bigint_divide(b, x, 1)
c2 = bigint_divide(bigint_minus(a, 1), x, 1)
print(bigint_minus(c1, c2) |
s152259816 | p03861 | u739843002 | 1597340405 | Python | Python (3.8.2) | py | Runtime Error | 28 | 8896 | 31 | 3 4 240
60 90 120
80 150 80 150 |
s451911876 | p03861 | u036914910 | 1597119305 | Python | Python (3.8.2) | py | Runtime Error | 29 | 9100 | 101 | a,b,x = map(int,input().split())
fb = b//x+1
if a!= 0 :
fa = (a-1)//x+1
else :
0
print(fb-fa) |
s588424139 | p03861 | u207767041 | 1596492493 | Python | PyPy3 (7.3.0) | py | Runtime Error | 103 | 74716 | 90 | a,b,c = list(map(int,input().split()))
a1 = a//c
a2 = b//c if b%x else b//c-1
print(a1-a2) |
s236177182 | p03861 | u207767041 | 1596492056 | Python | Python (3.8.2) | py | Runtime Error | 25 | 9100 | 65 | a,b,c = list(map(str,input().split()))
a = a/c
b = b/c
print(b-a) |
s524594594 | p03861 | u642528832 | 1596322415 | Python | Python (3.8.2) | py | Runtime Error | 26 | 8964 | 52 | l = input().replace(' ','')
print(l[0]+l[7]+l[-7])
|
s843988470 | p03861 | u805375187 | 1596150918 | Python | Python (3.8.2) | py | Runtime Error | 114 | 27256 | 101 | import numpy as np
a, b, x = map(int, input().split())
A = np.arange(a,b+1)
print(np.sum(A % x == 0)) |
s738089216 | p03861 | u970109776 | 1595992281 | Python | Python (3.8.2) | py | Runtime Error | 26 | 9044 | 250 | #coding: utf-8
N, X = (int(x) for x in input().split())
A = [int(x) for x in input().split()]
ret = 0
for i in range(N-1):
if A[i] + A[i+1] > X:
tmp = A[i] + A[i+1] - X
ret += tmp
A[i+1] -= min(A[i+1], tmp)
print(ret)
|
s085868113 | p03861 | u465101448 | 1595295299 | Python | Python (3.8.2) | py | Runtime Error | 26 | 9100 | 107 | a,b,x = list(map(int,input_[0].split()))
ans=0
if a!=b:
A=(a-1)//x
B=b//x
ans=B-A
print(ans) |
s113151542 | p03861 | u081149041 | 1594942970 | Python | Python (3.8.2) | py | Runtime Error | 25 | 9052 | 243 | import sys
def I_dont_know_what_to_do():
a = long(input())
b = long(input())
c = int(input())
if a < b:
n = a
a = b
b = n
s = (a - b + 2 - a % c - b % c) / c
print(s)
I_dont_know_what_to_do() |
s515829294 | p03861 | u081149041 | 1594942743 | Python | Python (3.8.2) | py | Runtime Error | 26 | 8912 | 255 | def I_dont_know_what_to_do():
a = long long int(input())
b = long long int(input())
c = int(input())
if (a - b < 0)
n = a
a = b
b = n
s = (a - b + 2 - a % c - b % c) / c
print(s)
I_dont_know_what_to_do() |
s822708116 | p03861 | u755116850 | 1594599715 | Python | Python (3.8.2) | py | Runtime Error | 26 | 9180 | 213 | # coding: utf-8
a, b, x = map(int, input().split(" "))
n = b - a - 1
# coding: utf-8
a, b, x = map(int, input().split(" "))
n = b - a
if a % x == 0 or b % x == 0:
print(n // x + 1)
else:
print(n // x)
|
s868111668 | p03861 | u044220565 | 1594335115 | Python | Python (3.8.2) | py | Runtime Error | 24 | 9028 | 599 | # coding: utf-8
import sys
#from operator import itemgetter
sysread = sys.stdin.buffer.readline
read = sys.stdin.buffer.read
#from heapq import heappop, heappush
#from collections import defaultdict
sys.setrecursionlimit(10**7)
#import math
#from itertools import product, accumulate, combinations, product
#import bisect# lower_bound etc
#import numpy as np
#from copy import deepcopy
#from collections import deque
def run():
a,b,x = map(int, input().split())
ans = 0
if a == 0:
a += 1
ans = 1
ans += b // x - (a-1) // x
print(ans)
if __name__ == "__main__": |
s972048878 | p03861 | u773440446 | 1593460591 | Python | Python (3.8.2) | py | Runtime Error | 25 | 9064 | 107 | a,b,x = map(int,input().split())
a = range(a,b+1)
q = 0
for i in a:
if a%i == 0:
q += 1
print(q) |
s565707105 | p03861 | u088488125 | 1593356069 | Python | Python (3.8.2) | py | Runtime Error | 25 | 9096 | 70 | a,b=map(int, input().split())
max=b//x
min=(a+x-1)//x
print(max-min+1) |
s435443526 | p03861 | u088488125 | 1593355727 | Python | Python (3.8.2) | py | Runtime Error | 27 | 9168 | 85 | a,b,x=map(int, input())
n=x*((a+x-1)//x)
cnt=0
while n<=b:
cnt+=1
n+=x
print(cnt) |
s514537038 | p03861 | u854992222 | 1592879611 | Python | Python (3.8.2) | py | Runtime Error | 31 | 9100 | 133 | a, b, x = map(int, input().split())
x = (b - a)//x -1
y = 0
z = 0
if a % x == 0:
y = 1
if b % x == 0:
z = 1
print(x + y + z) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.