結果
| 問題 | No.29 パワーアップ |
| コンテスト | |
| ユーザー |
neko_the_shadow
|
| 提出日時 | 2017-01-15 18:07:05 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
AC
|
| 実行時間 | 33 ms / 5,000 ms |
| コード長 | 355 bytes |
| 記録 | |
| コンパイル時間 | 97 ms |
| コンパイル使用メモリ | 12,032 KB |
| 実行使用メモリ | 10,496 KB |
| 最終ジャッジ日時 | 2025-10-24 20:59:51 |
| 合計ジャッジ時間 | 1,718 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 22 |
ソースコード
import collections
if __name__ == '__main__':
stock = collections.defaultdict(int)
n = int(input())
for _ in range(n):
items = map(int, input().split())
for item in items: stock[item] += 1
ans = rest = 0
for ky in stock:
ans += stock[ky] // 2
rest += stock[ky] % 2
print(ans + rest // 4)
neko_the_shadow