結果
| 問題 | No.29 パワーアップ |
| コンテスト | |
| ユーザー |
ymgckyo
|
| 提出日時 | 2017-11-04 16:43:19 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
AC
|
| 実行時間 | 29 ms / 5,000 ms |
| コード長 | 539 bytes |
| 記録 | |
| コンパイル時間 | 164 ms |
| コンパイル使用メモリ | 12,288 KB |
| 実行使用メモリ | 10,240 KB |
| 最終ジャッジ日時 | 2025-10-24 21:03:35 |
| 合計ジャッジ時間 | 1,433 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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