結果
問題 | No.634 硬貨の枚数1 |
ユーザー |
|
提出日時 | 2022-08-16 02:05:18 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
TLE
(最新)
AC
(最初)
|
実行時間 | - |
コード長 | 276 bytes |
コンパイル時間 | 93 ms |
コンパイル使用メモリ | 12,672 KB |
実行使用メモリ | 11,008 KB |
最終ジャッジ日時 | 2024-10-02 14:06:46 |
合計ジャッジ時間 | 66,009 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 74 TLE * 1 |
ソースコード
n = int(input()) C = [] i = 1 while i * (i + 1) // 2 <= n: C.append(i * (i + 1) // 2) i += 1 if C[-1] == n: print(1) exit() m = len(C) for i in range(m): for j in range(i, m): if C[i] + C[j] == n: print(2) exit() print(3)