結果
問題 |
No.1737 One to N
|
ユーザー |
![]() |
提出日時 | 2022-05-30 15:36:36 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 86 ms / 2,000 ms |
コード長 | 190 bytes |
コンパイル時間 | 230 ms |
コンパイル使用メモリ | 82,688 KB |
実行使用メモリ | 78,208 KB |
最終ジャッジ日時 | 2024-09-21 00:52:34 |
合計ジャッジ時間 | 3,103 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 27 |
ソースコード
n=int(input()) dp=[10**8]*(n+1) dp[1]=0 for i in range(1,n): for j in range(2,n+1): if i * j > n: break dp[i*j] = min(dp[i*j],dp[i]+j) print(dp[n])