結果

問題 No.522 Make Test Cases(テストケースを作る)
ユーザー 👑 yumechiyumechi
提出日時 2017-03-19 09:36:33
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 1,690 ms / 2,000 ms
コード長 278 bytes
コンパイル時間 450 ms
コンパイル使用メモリ 87,284 KB
実行使用メモリ 267,376 KB
最終ジャッジ日時 2023-09-25 12:42:18
合計ジャッジ時間 5,271 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 102 ms
78,292 KB
testcase_01 AC 136 ms
82,036 KB
testcase_02 AC 127 ms
80,820 KB
testcase_03 AC 186 ms
88,380 KB
testcase_04 AC 73 ms
71,220 KB
testcase_05 AC 73 ms
71,436 KB
testcase_06 AC 72 ms
71,476 KB
testcase_07 AC 79 ms
75,232 KB
testcase_08 AC 97 ms
76,984 KB
testcase_09 AC 155 ms
83,548 KB
testcase_10 AC 1,690 ms
267,376 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

def solve():
    n = int(input())
    ans = set()
    for i in range(1, n//3+1):
        for j in range(1, n*2//3):
            ans.add(tuple(sorted([i, j, n-i-j])))
    for elem in sorted(list(ans)):
        print(" ".join(map(str, elem)))

if __name__=="__main__":
    solve()
0