結果

問題 No.2027 (1, 2, 3, …, N) 's Subset Sum
ユーザー tassei903tassei903
提出日時 2022-08-08 07:07:24
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 94 ms / 2,000 ms
コード長 142 bytes
コンパイル時間 163 ms
コンパイル使用メモリ 81,648 KB
実行使用メモリ 98,448 KB
最終ジャッジ日時 2023-10-18 22:28:40
合計ジャッジ時間 4,683 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 37 ms
53,504 KB
testcase_01 AC 37 ms
53,504 KB
testcase_02 AC 91 ms
98,440 KB
testcase_03 AC 37 ms
53,504 KB
testcase_04 AC 94 ms
98,448 KB
testcase_05 AC 90 ms
98,448 KB
testcase_06 AC 91 ms
98,184 KB
testcase_07 AC 53 ms
70,540 KB
testcase_08 AC 81 ms
91,320 KB
testcase_09 AC 52 ms
66,476 KB
testcase_10 AC 67 ms
82,608 KB
testcase_11 AC 53 ms
67,388 KB
testcase_12 AC 57 ms
76,000 KB
testcase_13 AC 56 ms
73,008 KB
testcase_14 AC 51 ms
66,608 KB
testcase_15 AC 55 ms
70,540 KB
testcase_16 AC 60 ms
77,132 KB
testcase_17 AC 42 ms
59,476 KB
testcase_18 AC 38 ms
53,504 KB
testcase_19 AC 38 ms
53,504 KB
testcase_20 AC 42 ms
59,476 KB
testcase_21 AC 39 ms
53,504 KB
testcase_22 AC 74 ms
87,888 KB
testcase_23 AC 64 ms
81,552 KB
testcase_24 AC 51 ms
67,128 KB
testcase_25 AC 78 ms
90,792 KB
testcase_26 AC 54 ms
70,916 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n,s = map(int,input().split())
a = []
for i in range(n,0,-1):
    if s >= i:
        s -= i
        a.append(i)
print(len(a))
print(*a[::-1])
0