結果
| 問題 | No.634 硬貨の枚数1 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2026-07-25 22:25:40 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 351 bytes |
| 記録 | |
| コンパイル時間 | 370 ms |
| コンパイル使用メモリ | 96,236 KB |
| 実行使用メモリ | 83,584 KB |
| 最終ジャッジ日時 | 2026-07-25 22:25:52 |
| 合計ジャッジ時間 | 8,294 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge3_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 9 WA * 66 |
ソースコード
from bisect import bisect_right
N = int(input())
material = [1]
diff = 2
for i in range(10000):
sub = material[-1] + diff
if sub > 10**7:
break
material.append(sub)
diff += 1
nokori = N
cnt = 0
while nokori > 0:
idx = bisect_right(material, nokori) - 1
price = material[idx]
nokori -= price
cnt += 1
print(cnt)