結果
| 問題 |
No.634 硬貨の枚数1
|
| コンテスト | |
| ユーザー |
ntuda
|
| 提出日時 | 2025-02-02 22:42:57 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 270 bytes |
| コンパイル時間 | 691 ms |
| コンパイル使用メモリ | 82,232 KB |
| 実行使用メモリ | 619,720 KB |
| 最終ジャッジ日時 | 2025-02-02 22:44:54 |
| 合計ジャッジ時間 | 106,698 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 41 TLE * 27 MLE * 7 |
ソースコード
from bisect import bisect
N = int(input())
k = 1
L = []
x = 1
while x <= N:
L.append(x)
k += 1
x = k * (k + 1) // 2
S = set(L)
S1 = set()
for i in L:
for j in L:
S1.add(i+j)
if N in S:
print(1)
elif N in S1:
print(2)
else:
print(3)
ntuda