結果
問題 |
No.634 硬貨の枚数1
|
ユーザー |
|
提出日時 | 2022-02-17 23:48:41 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 104 ms / 2,000 ms |
コード長 | 261 bytes |
コンパイル時間 | 151 ms |
コンパイル使用メモリ | 82,572 KB |
実行使用メモリ | 62,876 KB |
最終ジャッジ日時 | 2024-06-29 07:53:25 |
合計ジャッジ時間 | 7,082 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 75 |
ソースコード
N = int(input()) d = [] for i in range((int((2*N)**(1/2)))+1): d.append(i*(i+1)//2) dset = set(d) a = 3 for i in range(len(d)): if d[i] == N: a = min(1,a) for j in range(len(d)): if d[i] + d[j] == N: a = min(2,a) print(a)