Submission #4240700


Source Code Expand

def inpl(): return list(map(int, input().split()))
N = int(input())
C = [int(input()) for _ in range(N)] + [0]
ans = 0
for k in range(N):
    c = C[k]
    ans += c//2
    if c%2 and C[k+1]:
        ans += 1
        C[k+1] -= 1
print(ans)

Submission Info

Submission Time
Task B - Simplified mahjong
User nadare881
Language Python (3.4.3)
Score 400
Code Size 247 Byte
Status AC
Exec Time 235 ms
Memory 7920 KB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 400 / 400
Status
AC × 2
AC × 24
Set Name Test Cases
Sample s1.txt, s2.txt
All 01.txt, 02.txt, 03.txt, 04.txt, 05.txt, 06.txt, 07.txt, 08.txt, 09.txt, 10.txt, 11.txt, 12.txt, 13.txt, 14.txt, 15.txt, 16.txt, 17.txt, 18.txt, 19.txt, 20.txt, 21.txt, 22.txt, s1.txt, s2.txt
Case Name Status Exec Time Memory
01.txt AC 228 ms 7800 KB
02.txt AC 234 ms 7884 KB
03.txt AC 227 ms 7796 KB
04.txt AC 203 ms 6292 KB
05.txt AC 208 ms 6268 KB
06.txt AC 195 ms 6228 KB
07.txt AC 220 ms 7188 KB
08.txt AC 220 ms 7224 KB
09.txt AC 228 ms 7888 KB
10.txt AC 235 ms 7920 KB
11.txt AC 180 ms 4648 KB
12.txt AC 216 ms 7804 KB
13.txt AC 220 ms 7800 KB
14.txt AC 234 ms 7800 KB
15.txt AC 192 ms 4632 KB
16.txt AC 226 ms 7776 KB
17.txt AC 228 ms 7780 KB
18.txt AC 17 ms 3060 KB
19.txt AC 19 ms 2940 KB
20.txt AC 18 ms 2940 KB
21.txt AC 17 ms 3060 KB
22.txt AC 17 ms 3060 KB
s1.txt AC 17 ms 2940 KB
s2.txt AC 17 ms 2940 KB