結果
| 問題 |
No.3295 Buying Bottled Water
|
| コンテスト | |
| ユーザー |
13d0ccc0-b63b-11f0-9490-db448702d40f
|
| 提出日時 | 2025-10-31 18:43:45 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 644 bytes |
| コンパイル時間 | 394 ms |
| コンパイル使用メモリ | 12,288 KB |
| 実行使用メモリ | 10,496 KB |
| 最終ジャッジ日時 | 2025-10-31 18:43:48 |
| 合計ジャッジ時間 | 2,363 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 16 WA * 3 |
ソースコード
import sys
sys.setrecursionlimit(999999999)
def count_element_numbers(int_list: list[int]) -> dict[int, int]:
"""
Counts the occurrences of each integer in the input list.
Example: count_element_numbers([1, 1, 3, 2, 2, 2, 4, 4, 4, 4]) => {1: 2, 2: 3, 3: 1, 4: 4}
"""
from itertools import groupby
result = {}
for key, group in groupby(sorted(int_list)):
count = len(list(group))
result[key] = count
return result
def solve():
n = int(input())
r1 = n // 500
if n <= 100:
print(0)
elif n - r1 * 500 <= 100:
print(r1)
else:
print(r1 + 1)
solve()
13d0ccc0-b63b-11f0-9490-db448702d40f