結果

問題 No.29 パワーアップ
ユーザー szkhtsszkhts
提出日時 2023-01-08 07:48:55
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 292 bytes
コンパイル時間 355 ms
コンパイル使用メモリ 10,608 KB
実行使用メモリ 8,000 KB
最終ジャッジ日時 2023-08-21 19:00:52
合計ジャッジ時間 2,015 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 15 ms
7,956 KB
testcase_01 AC 16 ms
7,776 KB
testcase_02 AC 15 ms
7,780 KB
testcase_03 WA -
testcase_04 AC 16 ms
7,860 KB
testcase_05 WA -
testcase_06 WA -
testcase_07 AC 15 ms
7,976 KB
testcase_08 WA -
testcase_09 AC 16 ms
7,756 KB
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
testcase_13 AC 16 ms
7,788 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,832 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

weapon = [0] * 11
N = int(input())
for _ in range(N):
    i, j, k = map(int, input().split())
    weapon[i] += 1
    weapon[j] += 1
    weapon[k] += 1

lvup = 0
tmp = 0
for w in weapon:
    if w >= 2:
        lvup += (w // 2)
    elif w >= 1:
        tmp += 1

lvup += (tmp // 4)

print(lvup)
0