結果

問題 No.29 パワーアップ
ユーザー brthyyjpbrthyyjp
提出日時 2020-12-02 11:29:35
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 79 ms / 5,000 ms
コード長 250 bytes
コンパイル時間 439 ms
コンパイル使用メモリ 86,780 KB
実行使用メモリ 71,196 KB
最終ジャッジ日時 2023-10-11 07:03:17
合計ジャッジ時間 3,115 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 73 ms
71,172 KB
testcase_01 AC 72 ms
71,176 KB
testcase_02 AC 74 ms
71,020 KB
testcase_03 AC 72 ms
71,048 KB
testcase_04 AC 76 ms
70,732 KB
testcase_05 AC 74 ms
71,096 KB
testcase_06 AC 75 ms
71,140 KB
testcase_07 AC 75 ms
70,728 KB
testcase_08 AC 73 ms
71,136 KB
testcase_09 AC 73 ms
71,132 KB
testcase_10 AC 76 ms
71,144 KB
testcase_11 AC 74 ms
71,196 KB
testcase_12 AC 75 ms
71,024 KB
testcase_13 AC 78 ms
70,968 KB
testcase_14 AC 79 ms
70,856 KB
testcase_15 AC 73 ms
71,020 KB
testcase_16 AC 73 ms
70,736 KB
testcase_17 AC 74 ms
70,940 KB
testcase_18 AC 75 ms
71,092 KB
testcase_19 AC 75 ms
70,836 KB
testcase_20 AC 75 ms
71,188 KB
testcase_21 AC 73 ms
70,972 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())
C = [0]*10
for i in range(n):
    a,b,c = map(int, input().split())
    a,b,c = a-1, b-1, c-1
    C[a] += 1
    C[b] += 1
    C[c] += 1
ans = 0
s = 0
for c in C:
    q, r = divmod(c, 2)
    ans += q
    s += r
ans += s//4
print(ans)
0