結果

問題 No.29 パワーアップ
ユーザー mnrmnr
提出日時 2020-02-26 19:23:16
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 766 bytes
コンパイル時間 253 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 10,880 KB
最終ジャッジ日時 2024-04-21 16:32:21
合計ジャッジ時間 1,466 ms
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 27 ms
10,880 KB
testcase_01 AC 26 ms
10,880 KB
testcase_02 AC 28 ms
10,880 KB
testcase_03 AC 29 ms
10,880 KB
testcase_04 AC 30 ms
10,880 KB
testcase_05 AC 28 ms
10,752 KB
testcase_06 WA -
testcase_07 AC 27 ms
10,752 KB
testcase_08 AC 27 ms
10,880 KB
testcase_09 WA -
testcase_10 AC 27 ms
10,880 KB
testcase_11 AC 26 ms
10,880 KB
testcase_12 AC 28 ms
10,880 KB
testcase_13 AC 27 ms
10,752 KB
testcase_14 AC 26 ms
10,880 KB
testcase_15 WA -
testcase_16 AC 27 ms
10,880 KB
testcase_17 AC 26 ms
10,880 KB
testcase_18 AC 25 ms
10,880 KB
testcase_19 AC 26 ms
10,880 KB
testcase_20 AC 27 ms
10,880 KB
testcase_21 AC 27 ms
10,880 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import math
N = int(input())
L = []
for i in range(N):
    a, b, c = map(int, input().split())
    L.append(a)
    L.append(b)
    L.append(c)

c = []
for i in range(10):
    c.append(0)

for i in range(3*N):
    if L[i] == 1:
        c[0] += 1
    elif L[i] == 2:
        c[1] += 1
    elif L[i] == 3:
        c[2] += 1
    elif L[i] == 4:
        c[3] += 1
    elif L[i] == 5:
        c[4] += 1
    elif L[i] == 6:
        c[5] += 1
    elif L[i] == 7:
        c[6] += 1
    elif L[i] == 8:
        c[7] += 1
    elif L[i] == 9:
        c[8] += 1
    elif L[i] == 10:
        c[9] += 1
        
cnt = 0
for i in range(10):
    while c[i] >= 2:
        c[i] -= 2
        cnt += 1
n = 0
for i in range(10):
    n += c[i]
if n > 3:
    cnt += round(n / 4)

print(cnt)
0