結果

問題 No.522 Make Test Cases(テストケースを作る)
ユーザー kichirb3kichirb3
提出日時 2018-04-10 22:10:33
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 1,005 ms / 2,000 ms
コード長 580 bytes
コンパイル時間 396 ms
コンパイル使用メモリ 10,760 KB
実行使用メモリ 8,416 KB
最終ジャッジ日時 2023-09-09 03:52:30
合計ジャッジ時間 3,978 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 22 ms
8,252 KB
testcase_01 AC 48 ms
8,416 KB
testcase_02 AC 40 ms
8,284 KB
testcase_03 AC 83 ms
8,232 KB
testcase_04 AC 15 ms
7,908 KB
testcase_05 AC 15 ms
7,804 KB
testcase_06 AC 15 ms
7,844 KB
testcase_07 AC 16 ms
7,736 KB
testcase_08 AC 18 ms
8,388 KB
testcase_09 AC 62 ms
8,188 KB
testcase_10 AC 1,005 ms
8,228 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

# -*- coding: utf-8 -*-
"""
No.522 Make Test Cases(テストケースを作る)
https://yukicoder.me/problems/no/522

"""
import sys
from sys import stdin
input = stdin.readline


def solve(N):
    for a in range(1, N//3 + 1):
        for b in range(a, N//2 + 1):
            c = N - a - b
            if c >= b:
                print(a, b, c)
                # res = '{} {} {}\n'.format(a, b, c)
                # sys.stdout.write(res)
            else:
                break


def main(args):
    N = int(input())
    solve(N)


if __name__ == '__main__':
    main(sys.argv[1:])
0