結果

問題 No.522 Make Test Cases(テストケースを作る)
ユーザー tikitaka1201tikitaka1201
提出日時 2020-09-16 20:42:29
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 559 ms / 2,000 ms
コード長 242 bytes
コンパイル時間 699 ms
コンパイル使用メモリ 86,084 KB
実行使用メモリ 174,852 KB
最終ジャッジ日時 2023-09-04 03:56:25
合計ジャッジ時間 3,951 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 94 ms
77,828 KB
testcase_01 AC 106 ms
80,572 KB
testcase_02 AC 108 ms
79,884 KB
testcase_03 AC 128 ms
86,580 KB
testcase_04 AC 70 ms
71,156 KB
testcase_05 AC 69 ms
71,364 KB
testcase_06 AC 70 ms
71,124 KB
testcase_07 AC 73 ms
71,116 KB
testcase_08 AC 90 ms
76,860 KB
testcase_09 AC 114 ms
82,944 KB
testcase_10 AC 559 ms
174,852 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n=int(input())
ans=[]
for a in range(1, n):
    if n-a>=2*a:
        for b in range(a, n):
            if n-a-b>=b:
                ans.append((a,b,n-a-b))
            else:
                break
    else:break
for tup in ans:
    print(*tup)
0