結果
問題 |
No.634 硬貨の枚数1
|
ユーザー |
![]() |
提出日時 | 2021-01-28 22:20:22 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 414 ms / 2,000 ms |
コード長 | 231 bytes |
コンパイル時間 | 312 ms |
コンパイル使用メモリ | 82,304 KB |
実行使用メモリ | 139,136 KB |
最終ジャッジ日時 | 2024-06-26 06:12:25 |
合計ジャッジ時間 | 17,651 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 75 |
ソースコード
N = int(input()) cnt = [3] * (N+1) val = [] i = 1 add = 1 while i <= N: cnt[i] = 1 val.append(i) for j in val: if i + j <= N: cnt[i + j] = min(cnt[i + j], 2) add += 1 i += add print(cnt[N])