AtCoder Grand Contest 003

Submission #4240700

Source codeソースコード

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

Task問題 B - Simplified mahjong
User nameユーザ名 nadare881
Created time投稿日時
Language言語 Python3 (3.4.3)
Status状態 AC
Score得点 400
Source lengthソースコード長 247 Byte
File nameファイル名
Exec time実行時間 235 ms
Memory usageメモリ使用量 7920 KB

Test case

Set

Set name Score得点 / Max score Cases
Sample - s1.txt,s2.txt
All 400 / 400 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

Test case

Case name Status状態 Exec time実行時間 Memory usageメモリ使用量
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