結果

問題 No.29 パワーアップ
ユーザー szkhtsszkhts
提出日時 2021-06-23 08:08:54
言語 Python3
(3.11.6 + numpy 1.26.0 + scipy 1.11.3)
結果
WA  
実行時間 -
コード長 424 bytes
コンパイル時間 209 ms
コンパイル使用メモリ 10,608 KB
実行使用メモリ 7,936 KB
最終ジャッジ日時 2023-09-06 09:22:00
合計ジャッジ時間 1,903 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 16 ms
7,828 KB
testcase_01 AC 16 ms
7,788 KB
testcase_02 AC 16 ms
7,856 KB
testcase_03 WA -
testcase_04 AC 16 ms
7,936 KB
testcase_05 WA -
testcase_06 WA -
testcase_07 AC 16 ms
7,776 KB
testcase_08 WA -
testcase_09 AC 16 ms
7,820 KB
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
testcase_13 AC 16 ms
7,896 KB
testcase_14 WA -
testcase_15 WA -
testcase_16 WA -
testcase_17 WA -
testcase_18 WA -
testcase_19 WA -
testcase_20 WA -
testcase_21 AC 16 ms
7,828 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

def main():
    N = int(input())
    items = [0] * 10
    lvup = 0
    lvup_c = 0

    for _ in range(N):
        a, b, c = map(int, input().split())
        items[a - 1] += 1
        items[b - 1] += 1
        items[c - 1] += 1

    for i in items:
        if i >= 2:
            lvup += (i // 2)
        elif i == 1:
            lvup_c += 1

    lvup += (lvup_c // 4)

    print(lvup)

if __name__ == '__main__':
    main()
0