結果
問題 | No.29 パワーアップ |
ユーザー |
|
提出日時 | 2021-05-06 15:55:50 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 43 ms / 5,000 ms |
コード長 | 354 bytes |
コンパイル時間 | 351 ms |
コンパイル使用メモリ | 82,304 KB |
実行使用メモリ | 52,480 KB |
最終ジャッジ日時 | 2024-09-14 07:25:07 |
合計ジャッジ時間 | 2,075 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 22 |
ソースコード
N = int(input()) item_cnt = [0]*10 for _ in range(N): item = list(map(int,input().split())) for i in item: item_cnt[i-1] += 1 ans = 0 for i in range(10): power = item_cnt[i]//2 ans += power item_cnt[i] -= power*2 if item_cnt.count(1) >= 8: ans += 2 elif item_cnt.count(1) >= 4: ans += 1 print(ans)