結果

問題 No.29 パワーアップ
ユーザー rin204rin204
提出日時 2020-06-09 22:24:55
言語 Python3
(3.10.1 + numpy 1.22.3 + scipy 1.8.0)
結果
AC  
実行時間 15 ms / 5,000 ms
コード長 245 bytes
コンパイル時間 49 ms
使用メモリ 7,720 KB
最終ジャッジ日時 2023-01-17 21:00:44
合計ジャッジ時間 1,702 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
使用メモリ
testcase_00 AC 12 ms
7,536 KB
testcase_01 AC 11 ms
7,576 KB
testcase_02 AC 13 ms
7,712 KB
testcase_03 AC 12 ms
7,712 KB
testcase_04 AC 12 ms
7,720 KB
testcase_05 AC 12 ms
7,564 KB
testcase_06 AC 13 ms
7,620 KB
testcase_07 AC 12 ms
7,560 KB
testcase_08 AC 12 ms
7,660 KB
testcase_09 AC 12 ms
7,668 KB
testcase_10 AC 12 ms
7,540 KB
testcase_11 AC 15 ms
7,700 KB
testcase_12 AC 12 ms
7,524 KB
testcase_13 AC 13 ms
7,524 KB
testcase_14 AC 12 ms
7,620 KB
testcase_15 AC 13 ms
7,564 KB
testcase_16 AC 13 ms
7,608 KB
testcase_17 AC 12 ms
7,536 KB
testcase_18 AC 13 ms
7,668 KB
testcase_19 AC 12 ms
7,664 KB
testcase_20 AC 13 ms
7,672 KB
testcase_21 AC 13 ms
7,560 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())
lst = [0 for _ in range(11)]
for _ in range(n):
    a, b, c = map(int, input().split())
    lst[a] += 1
    lst[b] += 1
    lst[c] += 1
ans = 0
tmp = 0
for num in lst:
    ans += num // 2
    tmp += num % 2
print(ans + tmp // 4)
0