Submission #3736580


Source Code Expand

N,T = map(int,input().split())
t = list(map(int,input().split()))
sum_time = 0
for i in range(1,N):
    if T <= t[i] - t[i-1]:
        sum_time += T
    elif T > t[i] - t[i-1]:
        sum_time += t[i] - t[i-1]
sum_time += T
print(sum_time)

Submission Info

Submission Time
Task C - Sentou
User pynomi
Language Python (3.4.3)
Score 300
Code Size 249 Byte
Status AC
Exec Time 184 ms
Memory 25200 KB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 300 / 300
Status
AC × 5
AC × 13
Set Name Test Cases
Sample example0, example1, example2, example3, example4
All example0, example1, example2, example3, example4, maxrand0, maxrand1, maxrand2, rand0, rand1, rand2, rand3, rand4
Case Name Status Exec Time Memory
example0 AC 18 ms 3060 KB
example1 AC 18 ms 2940 KB
example2 AC 18 ms 3060 KB
example3 AC 18 ms 3060 KB
example4 AC 18 ms 3060 KB
maxrand0 AC 184 ms 25068 KB
maxrand1 AC 184 ms 25196 KB
maxrand2 AC 130 ms 25200 KB
rand0 AC 19 ms 3060 KB
rand1 AC 19 ms 3060 KB
rand2 AC 18 ms 3060 KB
rand3 AC 18 ms 3060 KB
rand4 AC 19 ms 3060 KB