結果

問題 No.522 Make Test Cases(テストケースを作る)
ユーザー convexineqconvexineq
提出日時 2021-02-11 00:51:10
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 431 ms / 2,000 ms
コード長 291 bytes
コンパイル時間 272 ms
コンパイル使用メモリ 87,080 KB
実行使用メモリ 83,616 KB
最終ジャッジ日時 2023-09-22 21:35:59
合計ジャッジ時間 4,006 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 96 ms
77,492 KB
testcase_01 AC 115 ms
77,628 KB
testcase_02 AC 109 ms
77,596 KB
testcase_03 AC 131 ms
78,140 KB
testcase_04 AC 71 ms
71,112 KB
testcase_05 AC 71 ms
71,180 KB
testcase_06 AC 71 ms
71,204 KB
testcase_07 AC 74 ms
71,408 KB
testcase_08 AC 97 ms
76,176 KB
testcase_09 AC 122 ms
77,984 KB
testcase_10 AC 431 ms
83,616 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())
def dfs(i):
    if i==2:
        v = n-lst[0]-lst[1]
        if v >= lst[1]:
            lst[2] = v
            print(*lst)
            lst[2] = 1
        return
    for j in range(lst[i-1],n-lst[i-1]):
        lst[i] = j
        dfs(i+1)
    lst[i] = 1
lst = [1,1,1]
dfs(0)
0