結果
| 問題 | No.29 パワーアップ |
| コンテスト | |
| ユーザー |
ymgckyo
|
| 提出日時 | 2017-11-04 16:43:19 |
| 言語 | Python3 (3.14.3 + numpy 2.4.4 + scipy 1.17.1) |
| 結果 |
AC
|
| 実行時間 | 93 ms / 5,000 ms |
| + 589µs | |
| コード長 | 539 bytes |
| 記録 | |
| コンパイル時間 | 286 ms |
| コンパイル使用メモリ | 21,408 KB |
| 実行使用メモリ | 15,868 KB |
| 最終ジャッジ日時 | 2026-07-15 21:56:53 |
| 合計ジャッジ時間 | 3,643 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 22 |
ソースコード
n = int(input())
input_list, tmp_list, check_list = [], [], []
for i in range(n):
input_list.extend(map(int, (input().split())))
tmp_list.extend(input_list)
powerup_counter = 0
for e in input_list:
if e in check_list:
continue
if input_list.count(e) >= 2:
powerup_counter += input_list.count(e) // 2
for i in range(input_list.count(e) // 2 * 2):
tmp_list.remove(e)
check_list.append(e)
if len(tmp_list) >= 4:
powerup_counter += len(tmp_list) // 4
print(powerup_counter)
ymgckyo