結果
| 問題 |
No.1737 One to N
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2021-11-12 22:06:16 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 156 bytes |
| コンパイル時間 | 92 ms |
| コンパイル使用メモリ | 12,416 KB |
| 実行使用メモリ | 22,412 KB |
| 最終ジャッジ日時 | 2024-11-25 18:47:53 |
| 合計ジャッジ時間 | 26,667 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 23 TLE * 4 |
ソースコード
n = int(input())
dp = [123456789]*(n+1)
dp[1] = 0
for x in range(1,n):
for y in range(x*2,n+1,x):
dp[y] = min(dp[y], dp[x] + y//x)
print(dp[n])