結果
| 問題 |
No.2522 Fall in love, Girls!
|
| コンテスト | |
| ユーザー |
MasKoaTS
|
| 提出日時 | 2022-01-24 17:05:43 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
RE
|
| 実行時間 | - |
| コード長 | 325 bytes |
| コンパイル時間 | 1,476 ms |
| コンパイル使用メモリ | 82,220 KB |
| 実行使用メモリ | 66,872 KB |
| 最終ジャッジ日時 | 2024-09-25 13:15:29 |
| 合計ジャッジ時間 | 3,401 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | RE * 4 |
| other | RE * 30 |
ソースコード
import sys
input = sys.stdin.readline
n, s = map(int, input().split())
a = [1, 2]
for i in range(n - 2):
a.append(a[i] + a[i + 1])
if(sum(a) < s):
print("No")
exit(0)
cnt = 0
ans = []
for i in range(n - 1, -1, -1):
if(a[i] <= s):
ans.append(i + 1)
cnt += 1
s -= a[i];
if(s == 0):
break
print(cnt)
print(*ans)
MasKoaTS