結果
| 問題 |
No.634 硬貨の枚数1
|
| コンテスト | |
| ユーザー |
👑 Kazun
|
| 提出日時 | 2021-04-14 02:30:42 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 66 ms / 2,000 ms |
| コード長 | 269 bytes |
| コンパイル時間 | 200 ms |
| コンパイル使用メモリ | 82,328 KB |
| 実行使用メモリ | 62,044 KB |
| 最終ジャッジ日時 | 2024-06-30 03:49:16 |
| 合計ジャッジ時間 | 5,480 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 75 |
ソースコード
N=int(input())
X=[]
k=1
while True:
y=k*(k+1)//2
if y>N:
break
k+=1
X.append(y)
if N in X:
print(1)
exit()
L=len(X)
for i in range(L):
for j in range(i,L):
if X[i]+X[j]==N:
print(2)
exit()
print(3)
Kazun