結果

問題 No.115 遠足のおやつ
ユーザー nebukuro09nebukuro09
提出日時 2016-10-12 23:42:18
言語 Python2
(2.7.18)
結果
TLE  
実行時間 -
コード長 195 bytes
コンパイル時間 69 ms
コンパイル使用メモリ 7,040 KB
実行使用メモリ 11,776 KB
最終ジャッジ日時 2024-05-01 19:48:27
合計ジャッジ時間 8,026 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 9 ms
6,400 KB
testcase_01 AC 9 ms
6,400 KB
testcase_02 AC 10 ms
6,272 KB
testcase_03 AC 9 ms
6,400 KB
testcase_04 AC 593 ms
6,400 KB
testcase_05 AC 11 ms
6,400 KB
testcase_06 AC 10 ms
6,272 KB
testcase_07 AC 11 ms
6,400 KB
testcase_08 AC 9 ms
6,400 KB
testcase_09 AC 10 ms
6,400 KB
testcase_10 AC 10 ms
6,400 KB
testcase_11 AC 9 ms
6,528 KB
testcase_12 AC 10 ms
6,400 KB
testcase_13 AC 10 ms
6,400 KB
testcase_14 AC 12 ms
6,400 KB
testcase_15 AC 248 ms
6,272 KB
testcase_16 AC 38 ms
6,272 KB
testcase_17 AC 9 ms
6,400 KB
testcase_18 TLE -
testcase_19 -- -
testcase_20 -- -
testcase_21 -- -
testcase_22 -- -
testcase_23 -- -
testcase_24 -- -
testcase_25 -- -
testcase_26 -- -
testcase_27 -- -
testcase_28 -- -
testcase_29 -- -
testcase_30 -- -
testcase_31 -- -
testcase_32 -- -
testcase_33 -- -
testcase_34 -- -
testcase_35 -- -
testcase_36 -- -
testcase_37 -- -
testcase_38 -- -
testcase_39 -- -
testcase_40 -- -
testcase_41 -- -
testcase_42 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

from itertools import combinations
n, d, k = map(int, raw_input().split())
for c in combinations(range(1, n+1), k):
    if sum(c) == d:
        print ' '.join(map(str, c))
        exit()
print -1
0