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
s707832752
p03730
u009102496
1494169006
Python
Python (3.4.3)
py
Runtime Error
17
2940
159
a,b,c=map(int,input(),split()) d=0 for n in range(1,b+1): if n*a%b==c: d=d+1 else: d=d if d>0: print("YES") else: print("NO")
s005571674
p03730
u009102496
1494168955
Python
Python (3.4.3)
py
Runtime Error
17
2940
160
a,b,c=map(int,input(),split()) d=0 for n in range(1,b+1): if n*a%b==c: d=d+1 else: d=d: if d>0: print("YES") else: print("NO")
s312263232
p03730
u103099441
1493839774
Python
Python (3.4.3)
py
Runtime Error
17
3060
234
a, b, c = map(int, input().split()) n = max(int(b / a), 1) p = 'NO' s = set() r = n * a % b while r not in s: if r == c: p = 'YES' break else: s.append(r) n += 1 r = n * a % b print(p)
s813619827
p03730
u714878632
1493821694
Python
Python (3.4.3)
py
Runtime Error
17
3060
453
a,b,c = [int(i) for i in input().split()] arr = set() ret = "NO" r = a%b if r==0: if c==0: ret="YES" else: pass elif r==1: ret = "YES" else: rr = r while not(rr in arr): # print(arr,rr) if rr <= c and (c-rr)%r == 0: ret = "YES" break els...
s445702055
p03730
u622011073
1493689218
Python
Python (3.4.3)
py
Runtime Error
17
2940
65
a,_,c=map(int,input()).split();print(['YES','NO'][a&1==0and c&1])
s655094423
p03730
u821262411
1493527527
Python
Python (3.4.3)
py
Runtime Error
17
2940
115
import math a,b,c=map(int,input().split()) g = math.gcd(a,b) if c % g ==0 : print('YES') else: print('NO')
s278199569
p03730
u706884679
1493520450
Python
Python (3.4.3)
py
Runtime Error
17
2940
130
A, B, C = map(int, input().split()) i = 1 while i <= B: if (i * A) % B == C: print('YES') break else: i += 1 print('NO')
s018789513
p03730
u682181971
1493520139
Python
Python (3.4.3)
py
Runtime Error
18
3064
224
ABC = input().split() A=ABC[0] B=ABC[1] C=ABC[2] count = 100 N=0 for index in range(count+1): if (A*N-C)%B ==0: print("Yes") break elif index == (count): print("NO") else: N+=1
s637688214
p03730
u682181971
1493519976
Python
Python (3.4.3)
py
Runtime Error
17
3060
209
ABC = input().split() A=ABC[0] B=ABC[1] C=ABC[2] count = 50 N=0 for index in range(count+1): if (A*N-C)%B ==0: print("Yes") elif index == (count): print("NO") else: N+=1
s122060903
p03730
u106342872
1493518652
Python
Python (3.4.3)
py
Runtime Error
17
2940
529
#! -*- coding:utf-8 -*- a,b,c = map(int,input().split()) if a % 2 == 0 and b % 2 == 0 and c % 2 == 1: print('NO') elif a % 2 == 1 and b % 2 == 0 and c %2 == 0: print('NO') elif c == 0: print('YES') elif a == 1: print('YES') elif a % 2 == 0 and b % 2 == 1 and c % 2 = 1: print('NO') #elif a % 2 =...
s362247523
p03730
u290163555
1493518626
Python
Python (2.7.6)
py
Runtime Error
10
2568
261
import sys A, B, C = map(int, raw_input().split()) for i in range(1, 101): if C == 0 and (B * i % A) == 0 or \ (C % A) == 0 and (B * i % A) == 0 or \ (C % A) % (B * i % A) == 0: print('YES') sys.exit() print('NO')
s557358587
p03730
u290163555
1493518279
Python
Python (2.7.6)
py
Runtime Error
11
2568
187
A, B, C = map(int, raw_input().split()) if C == 0 and (B % A) == 0 or \ (C % A) == 0 and (B % A) == 0 or \ (C % A) % (B % A) == 0: print('YES') else: print('NO')
s750120560
p03730
u290163555
1493518161
Python
Python (2.7.6)
py
Runtime Error
10
2568
150
A, B, C = map(int, raw_input().split()) if (C % A) == 0 and (B % A) == 0 or \ (C % A) % (B % A) == 0: print('YES') else: print('NO')
s104773129
p03730
u290163555
1493518108
Python
Python (2.7.6)
py
Runtime Error
11
2568
149
A, B, C = map(int, raw_input().split()) if (C % A) == 0 && (B % A) == 0 or \ (C % A) % (B % A) == 0: print('YES') else: print('NO')
s315509818
p03730
u290163555
1493518026
Python
Python (2.7.6)
py
Runtime Error
11
2568
107
A, B, C = map(int, raw_input().split()) if (C % A) % (B % A) == 0: print('YES') else: print('NO')
s081724164
p03730
u087279476
1493517634
Python
Python (2.7.6)
py
Runtime Error
10
2568
204
a, b, c = map(int, input().split()) lisA = range(a, 100, a) lisB = range(b+c, 100, b) setA = set(lisA) setB = set(lisB) lisC = list(setA + setB) if len(lisC) == 0: print("YES") else: print("NO")
s844045158
p03730
u702719601
1493517473
Python
Python (3.4.3)
py
Runtime Error
17
3064
294
data = input().split() A = int(data[0]) B = int(data[1]) C = int(data[2]) if(A < 1 or 100 < A or B < 1 or 100 < B or C < 0 or B <= C): print("error") exit(-1) n = 1 while(n < B): ans = (A % B) * (n % B) if(ans >= B): ans %= B if(ans == C): print("YES") exit(1) n += 1 print("NO")
s650120202
p03730
u106342872
1493516454
Python
Python (3.4.3)
py
Runtime Error
18
2940
296
#! -*- coding:utf-8 -*- a,b,c = map(int,input().split()) if a % 2 == 0 and b % 2 == 0 and c % 2 == 1: print('NO') elif a % 2 == 1 and b % 2 == 0 and c %2 == 0: print('NO') elif a == 1: print('YES') elif a % 2 ==0 and b % 2 == 0 and a >= c: pritn('NO') else: print('YES')
s349372733
p03730
u702719601
1493515928
Python
Python (3.4.3)
py
Runtime Error
17
3060
210
data = input().split() A = int(data[0]) B = int(data[1]) C = int(data[2]) n = 1 while(n < B): ans = (A % B) * (n % B) while(ans >= B): ans %= B if(ans == C): print("YES") exit(1) n += 1 print("NO")
s354550640
p03730
u803848678
1493515428
Python
Python (3.4.3)
py
Runtime Error
17
2940
236
A, B, C = list(map(int, input.split())) s = 1 if A < B: s = B//A + 1 syo = A*s % B # 2とか def ans(syo, B, C): for i in range(100): if syo * i % B == C: return "YES" return "NO" print(ans(syo, B, C))
s550565113
p03730
u723654028
1493514370
Python
Python (3.4.3)
py
Runtime Error
20
3316
133
a, b, c = map(int, input().split()) for i in range(b): if ((i+1) * a) % b == c: print('YES') exit(1) print('NO')
s062102237
p03730
u290163555
1493514261
Python
Python (2.7.6)
py
Runtime Error
10
2580
89
A, B, C = map(int, raw_input()) if B + C <= 100: print('YES') else: print('NO')
s072836084
p03731
u666550725
1599854752
Python
PyPy3 (7.3.0)
py
Runtime Error
122
93828
182
N, T = map(int, input().split()) A = list(map(int, input().split())) ans = T for i in range(1, N): if A[i] - A[i-1] >= T: ans += T else: ans += (A[i] - A[i+1]) print(ans)
s341960729
p03731
u642528832
1599188602
Python
Python (3.8.2)
py
Runtime Error
24
8868
152
N,T = map(int,input().split()) t = list(map(int,input().split())) ans = T for i in range(N-1): now = t[i+1]-t[i] ans += min(now,T) print(ans)
s780102796
p03731
u244836567
1598827190
Python
Python (3.8.2)
py
Runtime Error
133
30748
150
a,b=input().split() a=int(a) b=int(b) c=list(map(int,input().split())) m=a*b for i in range(a): if c[i+1]-c[i]<b: m=m-(b-(c[i+1]-c[i])) print(m)
s713833650
p03731
u137214546
1596485264
Python
Python (3.8.2)
py
Runtime Error
20
9084
148
n, t = map(int, input().split()) arr = list(map(int, input().split())) summ = t for i in range(n-1): summ += min(t, arr[i+1] - arr[i]) return summ
s718098697
p03731
u870518235
1594439248
Python
Python (3.8.2)
py
Runtime Error
79
30724
201
N, T = map(int, input().split()) t = list(map(int, input().split())) lst = [0]*(t[N-1]+T) for i in range(N): for j in range(T): lst[t[i]+j] += 1 ans = len(lst) - lst.count(0) print(ans)
s403054919
p03731
u493130708
1590066498
Python
PyPy3 (2.4.0)
py
Runtime Error
256
78848
3075
# -*- coding: utf-8 -*- ############# # Libraries # ############# import sys input = sys.stdin.readline import math #from math import gcd import bisect from collections import defaultdict from collections import deque from functools import lru_cache ############# # Constants # ############# MOD = 10**9+7 INF = fl...
s089484031
p03731
u496821919
1589488148
Python
Python (3.4.3)
py
Runtime Error
135
26708
361
# -*- coding: utf-8 -*- """ Created on Thu May 14 16:15:19 2020 @author: shinba """ n,t = map(int,input().split()) T = list(map(int,input().split())) T.append(10**10) R = [] for i in range(n-1): R.append(T[i+1]-T[i]) ans = 0 start = T[0] for i in range(n): if R[i] <= t: continue ans += t+(T[i]-...
s095438794
p03731
u993090205
1589344196
Python
Python (3.4.3)
py
Runtime Error
17
3060
107
n,t=list(input()) ts = list(input()) print(sum([min(t, next - prev) for prev, next in zip(ts, ts[1:])], t))
s324880029
p03731
u652656291
1587834132
Python
Python (3.4.3)
py
Runtime Error
2128
385636
218
n,t = map(int,input().split()) T = list(map(int,input().split())) U = [] for i in range(n): for j in range(t): a = T[i] + j+1 U.append(a) setT = set(T) setU = set(U) ans = set(T) | set(U) print(ans.count())
s918911676
p03731
u652656291
1587833837
Python
Python (3.4.3)
py
Runtime Error
2128
396568
215
n,t = map(int,input().split()) T = list(map(int,input().split())) U = [] for i in range(n): for j in range(t): a = T[i] + t+1 U.append(a) setT = set(T) setU = set(U) ans = set(T)|set(U) print(ans.count())
s075559682
p03731
u686036872
1585905484
Python
Python (3.4.3)
py
Runtime Error
67
26832
154
N, T = map(int, input().split()) t = list(map(int, input().split())) t += t[-1]*2 ans = 0 for i in range(N): ans += min(T, t[i+1] - t[i]) print(ans)
s162418642
p03731
u547167033
1585002693
Python
Python (3.4.3)
py
Runtime Error
70
26836
126
N,T=map(int,input().split()) t=list(map(int,input().split()))+[10**18] x=0 for i in range(n): x+=min(t[i+1]-t[i],T) print(x)
s577754067
p03731
u520276780
1583979815
Python
PyPy3 (2.4.0)
py
Runtime Error
266
92880
211
n,t = map(int, input().split( )) t = tuple(map(int, input().split( ))) ans = 0 ti = 0; for i in range(n): if t[i] >= ti+t: ans += t else: ans += t[i] - ti ti = t[i] print(ans)
s844176759
p03731
u934868410
1583886443
Python
Python (3.4.3)
py
Runtime Error
68
26836
139
n,t = map(int,input().split()) a = list(map(int,input().split())) ans = t for i in range(0,n-1): ans += min(t, s[i+1] - s[i]) print(ans)
s493414353
p03731
u268792407
1580642228
Python
Python (3.4.3)
py
Runtime Error
104
25196
157
n,t=map(int,input().split()) a=list(map(int,input().split())) ans=a[-1]+t for i in range(1,n): if a[i]-a[i-1]>t: ans = ans - (t[i]-t[i-1]-t) print(ans)
s569682802
p03731
u843722521
1580071868
Python
PyPy3 (2.4.0)
py
Runtime Error
258
86996
126
n,t=map(int,input().split()) x=list(map(int,input().split())) a=t for i in range(n-1): a.append(min(x[i+1]-x[i],t)) print(a)
s496717503
p03731
u329706129
1576164839
Python
Python (3.4.3)
py
Runtime Error
17
2940
332
N, T = map(int, input().split()) t = [int(i) for i in input().split()] ans = T wait = 0 start = 0 for i in range(1, N): if (t[i] - t[i - 1] >= T): ans += wait + T start = t[i] wait = 0 else: wait = t[i] - start if (wait > T): ans, wait = ans + T, wait - T print(...
s247196963
p03731
u352359612
1575775803
Python
Python (3.4.3)
py
Runtime Error
17
2940
209
N, T = map(int, input().split()) t = list(map(int, input().split())) discount = 0 for i in range(N - 1): if t[i + 1] - t[i] < T: discount += (T - (t[i + 1] - t[i])) X = N * T - discount print(X
s974062660
p03731
u143278390
1575592945
Python
Python (3.4.3)
py
Runtime Error
17
3064
250
from bitarray import bitarray n,T=[int(i) for i in input().split()] t=[int(i) for i in input().split()] ans=0 for i in range(n-1): start=t[i] end=start+T if(end>t[i+1]): ans+=t[i+1]-t[i] else: ans+=T ans+=T print(ans)
s851484953
p03731
u143278390
1575591497
Python
Python (3.4.3)
py
Runtime Error
18
3064
229
from bitarray import bitarray n,T=[int(i) for i in input().split()] t=[int(i) for i in input().split()] ans=0 a = bitarray(100000) a.setall(0) for i in range(n): start=t[i] end=start+T a[start:end]=1 print(a.count())
s153274921
p03731
u215461917
1574530763
Python
Python (3.4.3)
py
Runtime Error
17
2940
231
N, T = map(int, input().split()) t = list(map(int, input().split())) s, e = 0, 0 ans = 0 for i in range(N): if t[i] <= e: e = t[i] + T else: ans += e - s s = t[i] e = t[i] + T ans += e - s print(ans)
s134951676
p03731
u202570162
1574297280
Python
Python (3.4.3)
py
Runtime Error
2105
38708
176
N,T = map(int,input().split()) Ts = [int(i) for i in input().split()] flow = set() for i in range(N): flow = set(list(flow)+list(range(Ts[i]+1,Ts[i]+T+1))) print(len(flow))
s140664594
p03731
u923659712
1573110978
Python
Python (3.4.3)
py
Runtime Error
113
26832
144
n,t=map(int,input().split()) a=list(map(int,input().split())) j=t for i in range(1,n+1): if a[i]>t: j+=t else: j+=a[i] print(j)
s877119371
p03731
u844697453
1573001506
Python
Python (3.4.3)
py
Runtime Error
2184
20856
138
a = list(input().split(" ")) b = list(input().split(" ")) oyu = [] for i in b: oyu[int(i):int(i)+int(a[1])] = [1] * int(a[1]) sum(oyu)
s192127976
p03731
u814986259
1572052626
Python
Python (3.4.3)
py
Runtime Error
17
2940
173
N,T=map(int,input().split()) t=list(map(int,input().split())) diff = [t[i]-t[i-1] fossil i in range(1,N)] ans=T*N for i in range(N-1): ans-=min((T - diff[i]),0) print(ans)
s086523242
p03731
u644907318
1571779026
Python
Python (3.4.3)
py
Runtime Error
67
26708
183
N,T = map(int,input().split()) T = list(map(int,input().split())) tot = 0 for i in range(1,N): d = T[i]-T[i-1] if d>T: tot += T else: tot += d print(tot+T)
s843106259
p03731
u644907318
1571778738
Python
Python (3.4.3)
py
Runtime Error
68
26708
181
N,T = map(int,input().split()) T = list(map(int,input().split())) tot = 0 for i in range(1,N): d = T[i]-T[i-1] if d>T: tot += T else: tot += d print(tot)
s429408286
p03731
u556589653
1567297706
Python
Python (3.4.3)
py
Runtime Error
66
25200
130
N,T = map(int,input().split()) t = list(map(int,input().split())) sum = 0 for i in range(N-1): sum += (T,t[i+1]-t[i]) print(sum)
s090891537
p03731
u556589653
1567297678
Python
Python (3.4.3)
py
Runtime Error
67
25196
149
N,T = map(int,input().split()) t = list(map(int,input().split())) sum = 0 sum += t[0] for i in range(N-1): sum += (T,t[i+1]-t[i]) print(sum)
s854537906
p03731
u716530146
1567213369
Python
Python (3.4.3)
py
Runtime Error
145
25196
207
n,t=map(int,input().split()) T=list(map(int,input().split())) count=0 if t>T[1]: count+=t-T[1] pre=T[1] for i in range(2,n): sa=T[i]-pre if t>sa: count+=t-sa pre=T[i] print(n*t-count)
s694303958
p03731
u518987899
1566877020
Python
Python (3.4.3)
py
Runtime Error
92
25200
252
N,T = map(int, input().strip().split(' ')) t = list(map(int, input().strip().split(' '))) imos = [0]*(t[-1]+T+1) for i in t: imos[i] += 1 imos[i+T] -= 1 for i in range(len(imos)-1): imos[i+1] += imos[i] print(len([1 for i in imos if i > 0]))
s246319884
p03731
u623819879
1566800675
Python
PyPy3 (2.4.0)
py
Runtime Error
264
99404
87
_,T,*a=map(int,open(0).read().split()) print(sum([min(i-j,t) for i,j in zip(a,[0]+a)]))
s980429291
p03731
u623819879
1566800162
Python
PyPy3 (2.4.0)
py
Runtime Error
171
38512
118
n,t=map(int,input().split()) a=[int(i) for i in input().split()] p=a[0] c=0 for i a: c+=t-i if p+t>i else t print(c)
s332119556
p03731
u626337957
1564928902
Python
Python (3.4.3)
py
Runtime Error
68
26836
190
N, K = map(int, input().split()) ans = 0 switches = list(map(int, input().split())) switches.append(10**9+10) for idx in range(N): ans += min(K, switches[i+1] - switches[i]) print(ans)
s092253329
p03731
u626337957
1564928873
Python
Python (3.4.3)
py
Runtime Error
17
2940
176
N, K = int(input()) ans = 0 switches = list(map(int, input().split())) switches.append(10**9+10) for idx in range(N): ans += min(K, switches[i+1] - switches[i]) print(ans)
s398075846
p03731
u037221289
1564032643
Python
Python (3.4.3)
py
Runtime Error
73
25200
147
N, T= map(int, input().split(' ')) X = [int(i) for i in input().split()] num = T for i in range(1, n): num += min(T, X[i] - X[i - 1]) print(num)
s230742472
p03731
u037221289
1564032590
Python
Python (3.4.3)
py
Runtime Error
74
25196
148
N, T= map(int, input().split(' ')) X = [int(i) for i in input().split()] num = T for i in range(1, n): num += min(T, X[i] - X[i - 1]) print(num)
s604893973
p03731
u695429668
1560832600
Python
Python (3.4.3)
py
Runtime Error
188
25708
446
N, T = list(map(int, input().split())) t = list(map(int, input().split())) if N == 1: print(T) exit(T) ans = 0 buff = 0 for i in range(N): if T > t[i]: buff = t[i] if i == N-1: ans += buff elif T <= t[i]: if buff + T > t[i]: ans += t[i] elif buf...
s202718380
p03731
u695429668
1560832399
Python
Python (3.4.3)
py
Runtime Error
192
25708
402
N, T = list(map(int, input().split())) t = list(map(int, input().split())) if N == 1: print(T) exit(T) ans = 0 buff = 0 for i in range(N): if T > t[i]: buff = t[i] if i == N-1: ans += buff elif T <= t[i]: if buff + T > t[i]: ans += t[i] elif buf...
s692687858
p03731
u695429668
1560832273
Python
Python (3.4.3)
py
Runtime Error
189
25708
401
N, T = list(map(int, input().split())) t = list(map(int, input().split())) if N == 1: print(T) exit(T) ans = 0 buff = 0 for i in range(N): if T > t[i]: buff = t[i] if i == N-1: ans = buff elif T <= t[i]: if buff + T > t[i]: ans += t[i] elif buff...
s504673059
p03731
u695429668
1560832034
Python
Python (3.4.3)
py
Runtime Error
186
26708
358
N, T = list(map(int, input().split())) t = list(map(int, input().split())) if N == 1: print(T) exit(T) ans = 0 buff = 0 for i in range(N): if T > t[i]: buff = t[i] elif T <= t[i]: if buff + T > t[i]: ans += t[i] elif buff + T <= t[i]: ans += T + buff ...
s983173967
p03731
u695429668
1560830132
Python
Python (3.4.3)
py
Runtime Error
159
26708
369
N, T = list(map(int, input().split())) t = list(map(int, input().split())) if N == 1: print(T) exit(T) # t.pop(0) ans = 0 buff = 0 for i in range(N): if t[i] <= T: buff = t[i] + T if N - 1 > i: if t[i+1] < buff: buff = t[i+1] elif t[i] > T: ans +=...
s384157506
p03731
u695429668
1560829969
Python
Python (3.4.3)
py
Runtime Error
171
25200
369
N, T = list(map(int, input().split())) t = list(map(int, input().split())) if N == 1: print(T) exit(T) # t.pop(0) ans = 0 buff = 0 for i in range(N): if t[i] <= T: buff = t[i] + T if N - 1 > i: if t[i+1] < buff: buff = t[i+1] elif t[i] > T: ans +=...
s159692811
p03731
u695429668
1560829842
Python
Python (3.4.3)
py
Runtime Error
333
25708
430
N, T = list(map(int, input().split())) t = list(map(int, input().split())) if N == 1: print(T) exit(T) # t.pop(0) ans = 0 buff = 0 for i in range(N): print(buff) if t[i] <= T: buff = t[i] + T if N - 1 > i: if t[i+1] < buff: buff = t[i+1] if i == N-...
s301812372
p03731
u077291787
1560238313
Python
Python (3.4.3)
py
Runtime Error
67
25200
207
# ABC060C - Sentou (ARC073C) n, t = list(map(int, input().rstrip().split())) lst = list(map(int, input().rstrip().split())) ans, cur = 0, i[0] for i in lst[1:]: ans += min(t, i - cur) ans += t print(ans)
s016087620
p03731
u844005364
1559060803
Python
Python (3.4.3)
py
Runtime Error
96
26836
263
n, time = map(int, input().split()) arr = list(map(int, input().split())) + [float("inf")] left, temp, sum_time = 0, 0, 0 for t in arr[1:]: if t <= temp + time: temp = t else: sum_time += (temp + time - left) left, temp = t print(sum_time)
s625071223
p03731
u844005364
1559060656
Python
Python (3.4.3)
py
Runtime Error
95
26708
260
n, time = map(int, input().split()) arr = list(map(int, input().split())) + [float("inf")] left, temp, sum_time = 0, 0, 0 for t in arr[1:]: if t <= left + time: temp = t else: sum_time += (temp + time - left) left, temp = t print(sum_time)
s171052288
p03731
u163320134
1558552301
Python
Python (3.4.3)
py
Runtime Error
21
8604
189
n,t=map(int,input().split()) arr=list(map(int,input())) start=arr[0] ans=0 for i in range(1,n): tmp=arr[i] if tmp-start<t: ans+=tmp-start else: ans+=t start=tmp print(ans+t)
s368297351
p03731
u163320134
1558552074
Python
Python (3.4.3)
py
Runtime Error
21
8732
187
n,t=map(int,input().split()) arr=list(map(int,input())) s=arr[0] ans=0 tmp=0 for i in range(1,n): if arr[i]-s<=t: tmp=arr[i]-s else: ans+=tmp+t tmp=0 ans+=tmp+t print(ans)
s030154000
p03731
u013408661
1554312374
Python
Python (3.4.3)
py
Runtime Error
37
6972
158
import sys n,t=map(int,input().split()) T=[int(i) for i in sys.stdin] endtime=0 for i in t: if endtime>i+t: endtime=endtime-(endtime-i)+t print(endtime)
s951744612
p03731
u026155812
1553891084
Python
Python (3.4.3)
py
Runtime Error
75
25200
220
from itertools import accumulate N, T = map(int, input().split()) t = [int(i) for i in input().split()] a = [0]*(t[-1]+T+1) for x in t: a[x] += 1 a[x+T] += -1 ans = len(a)-list(accumulate(a)).count(0) print(ans)
s963854488
p03731
u026155812
1553890598
Python
Python (3.4.3)
py
Runtime Error
76
25200
218
from itertools import accumulate N, T = map(int, input().split()) t = [int(i) for i in input().split()] a = [0]*(t[-1]+T+1) for x in t: a[x] = 1 a[x+T] = -1 ans = len(a)-list(accumulate(a)).count(0) print(ans)
s119681067
p03731
u531214632
1553082039
Python
Python (3.4.3)
py
Runtime Error
17
2940
186
N, T = map(int, input().split()) L = [int(i) for i in input().split()] gap=[] time=T for i in range(N-1) gap.append(L[i+1]-L[i]) for i in range(N-1): time += min(B[i],T) print(time)
s317955351
p03731
u286955577
1553074230
Python
Python (3.4.3)
py
Runtime Error
118
25700
232
from functools import reduce; from operator import add; print((lambda T, L: reduce(add, (lambda t, l: [min(i - j, t) for i, j in zip(l[1:], l[:-1])])(T, L), initializer=T))(int(input().split()[1]), list(map(int, input().split()))))
s681713158
p03731
u286955577
1553074060
Python
Python (3.4.3)
py
Runtime Error
121
25704
221
from functools import reduce; from operator import add; print((lambda T, L: T + reduce(add, (lambda t, l: [min(i - j, t) for i, j in zip(l[1:], l[:-1])])(T, L)))(int(input().split()[1]), list(map(int, input().split()))))
s036813841
p03731
u286955577
1553073999
Python
Python (3.4.3)
py
Runtime Error
123
25700
221
from functools import reduce; from operator import add; print((lambda T, L: T + reduce(add, (lambda t, l: [min(i - j, t) for i, j in zip(l[1:], l[:-1])])(T, L)))(int(input().split()[1]), list(map(int, input().split()))))
s549249398
p03731
u115994101
1553051999
Python
Python (2.7.6)
py
Runtime Error
10
2568
185
num,time = map(int, raw_input().split()) t = raw_input().split() ans = time for i in range(0,num-1): a = int(t[i+1])-int(t[i]) if a < time: ans += a else: ans += time print ans
s029306429
p03731
u115994101
1553050675
Python
Python (2.7.6)
py
Runtime Error
10
2568
166
num,time = map(int, raw_input().split()) t = raw_input().split() ans = 0 for i in t: if i<time: ans += i else: ans += time ans += time ans -= t[len(t)] print ans
s137114450
p03731
u115994101
1553050650
Python
Python (2.7.6)
py
Runtime Error
10
2568
168
num,time = map(int, raw_input().split()) t = raw_input().split() ans = 0 for i in t: if i<time: ans += i else: ans += time ans += time ans -= t[len(t)-1] print ans
s185344018
p03731
u115994101
1553050438
Python
Python (2.7.6)
py
Runtime Error
11
2568
178
num,time = map(int,raw_input().split()) t = map(int, raw_input().split()) ans = 0 for i in range(len(t)-1): if t(i)<time: ans += t(i) else: ans += time ans += time print ans
s872785509
p03731
u115994101
1553050357
Python
Python (2.7.6)
py
Runtime Error
10
2568
178
num,time = map(int,raw_input().split()) t = map(int, raw_input().split()) ans = 0 for i in range(len(t)-1): if t[i]<time: ans += t[i] else: ans += time ans += time print ans
s176284134
p03731
u555947166
1551574804
Python
Python (3.4.3)
py
Runtime Error
91
25200
293
N, T = list(map(int, input().split())) push_list = list(map(int, input().split())) print(push_list) dabaaaaa = 0 for i in range(len(dabaaaaa)-1): if push_list[i + 1] - push_list[i] < 5: dabaaaaa += push_list[i + 1] - push_list[i] else: dabaaaaa += 5 print(dabaaaaa)
s880368545
p03731
u033524082
1551245641
Python
Python (3.4.3)
py
Runtime Error
147
26836
358
n,t=map(int,input().split()) l=list(map(int,input().split())) time=t m=[0] i=1 if len(l)==1: print(t) else: while True: if l[i]-(time-m[-1])<0: time=time-(l[i]-(time-m[1]))+t else: m.append(time) time=t if i==n-1: break i+=1 pri...
s342739027
p03731
u505420467
1541347741
Python
Python (3.4.3)
py
Runtime Error
109
25200
226
n,t=map(int,input().split()) a=list(map(int,input().split())) y=max(a)+10+t b=[0]*y c=[0]*y for i in a: b[i]+=1 b[i+t]-=1 for i in range(len(b)): if i!=0: b[i]+=b[i-1] d=[i for i in b if i>0] print(len(d))
s334460842
p03731
u505420467
1541347680
Python
Python (3.4.3)
py
Runtime Error
108
25200
225
n,t=map(int,input().split()) a=list(map(int,input().split())) y=a[-1]+10+t b=[0]*y c=[0]*y for i in a: b[i]+=1 b[i+t]-=1 for i in range(len(b)): if i!=0: b[i]+=b[i-1] d=[i for i in b if i>0] print(len(d))
s359531279
p03731
u505420467
1541347638
Python
Python (3.4.3)
py
Runtime Error
117
25200
224
n,t=map(int,input().split()) a=list(map(int,input().split())) y=a[-1]+1+t b=[0]*y c=[0]*y for i in a: b[i]+=1 b[i+t]-=1 for i in range(len(b)): if i!=0: b[i]+=b[i-1] d=[i for i in b if i>0] print(len(d))
s825542998
p03731
u940102677
1539870012
Python
Python (3.4.3)
py
Runtime Error
152
25200
127
n,t = map(int,input().split()) a = list(map(int,input().split())) s = t for i in range(0,n): s += min(t,a[i+1]-a[i]) print(s)
s099872678
p03731
u598009172
1531974733
Python
Python (3.4.3)
py
Runtime Error
17
2940
168
N,T=(i for i in input().split()) t = [int(i) for i in input().split()] a=0 for b in range(N): if t[b] < T a = a + t[b] else: a = a + T print(a)
s863822317
p03731
u143492911
1517806438
Python
Python (3.4.3)
py
Runtime Error
169
25196
177
n,t=map(int,input().split()) a=list(map(int,input().split())) ans=int(0) for i in range(0,n): if n==i-1: ans+=t break ans+=min(t,a[i+1]-a[i]) print(ans)
s161700367
p03731
u925364229
1517677452
Python
Python (3.4.3)
py
Runtime Error
121
26708
283
N,T = map(int,input().split(" ")) t = list(map(int,input().split(" "))) scope = [[t[0],t[0]+T]] for i in range(1,N): if t[i] < scope[-1][1]: scope[-1][1] = t[i] + T else: scope.appned([t[i],t[i]+T]) total = 0 for begin,end in scope: total += (end - begin) print(total)
s381534566
p03731
u943004959
1514770073
Python
Python (3.4.3)
py
Runtime Error
95
25200
575
def LI(): return [int(x) for x in input().split(" ")] def LS(): return [str(x) for x in input().split(" ")] def ItoS(L): return [str(x) for x in L] def StoI(L): return [int(c) for c in L] def solve(): n, t = LI() T = LI() sentou = [0] * (T[-1] + t + 1) i = 0 while i < len(T): sentou[T...
s866372148
p03731
u943004959
1514769932
Python
PyPy3 (2.4.0)
py
Runtime Error
268
84572
575
def LI(): return [int(x) for x in input().split(" ")] def LS(): return [str(x) for x in input().split(" ")] def ItoS(L): return [str(x) for x in L] def StoI(L): return [int(c) for c in L] def solve(): n, t = LI() T = LI() sentou = [0] * (T[-1] + t + 1) i = 0 while i < len(T): sentou[T...
s262880693
p03731
u343437894
1499524254
Python
Python (3.4.3)
py
Runtime Error
110
25200
198
N, T = map(int, input().split(" ")) t = list(map(int, input().split(" "))) shower = 0 for i in range(1, N+1): if t[i] >= T: shower += T else: shower += t[i] print(shower)
s840789974
p03731
u343437894
1499524064
Python
Python (3.4.3)
py
Runtime Error
17
3060
212
N, T = map(int, input().filter(" ")) t = list(map(int, input().filter(" "))) shower = 0 for i in range(1, N): if t[i+1]-t[i] >= T: shower += T else: shower += t[i+1]-t[i] print(shower)
s656833698
p03731
u343437894
1499524026
Python
Python (3.4.3)
py
Runtime Error
17
3064
214
N, T = map(int, input().filter(" ")) t = list(map(int, input().filter(" "))) shower = 0 for i in range(1, N+1): if t[i+1]-t[i] >= T: shower += T else: shower += t[i+1]-t[i] print(shower)
s090915512
p03731
u343437894
1499523656
Python
Python (3.4.3)
py
Runtime Error
17
2940
193
a, b, c = map(int, input().split(" ")) for i in range(1, c): if (a * i) % b == c: print("YES") break else: print("NO") a* (任意の整数) % b = cとできるか?
s181401989
p03731
u859491652
1494984720
Python
Python (3.4.3)
py
Runtime Error
17
2940
398
#N,Tの取得 N,M = map(int, input().split()) #秒のリストを取得 tl = list(map(int, input().split())) bt = 0 #直前のスイッチを押した時間 gt = T #秒数総和 for t in tl(1:): if t - bt > T: gt += T #スイッチオフの時はT秒追加 else: gt += t - bt #スイッチがオンのとき、前回からの経過時間を加算 bt = t print(str(gt))
s835981193
p03731
u859491652
1494984580
Python
Python (3.4.3)
py
Runtime Error
17
2940
400
#N,Tの取得 N,T = map(int, input().split())) #秒のリストを取得 tl = list(map(int, input().split())) bt = 0 #直前のスイッチを押した時間 gt = T #秒数総和 for t in tl(1:): if t - bt > T: gt += T #スイッチオフの時はT秒追加 else: gt += t - bt #スイッチがオンのとき、前回からの経過時間を加算 bt = t print(str(gt))