結果

問題 No.522 Make Test Cases(テストケースを作る)
ユーザー kichirb3kichirb3
提出日時 2018-04-10 22:09:05
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 528 ms / 2,000 ms
コード長 578 bytes
コンパイル時間 244 ms
コンパイル使用メモリ 10,640 KB
実行使用メモリ 7,936 KB
最終ジャッジ日時 2023-09-09 03:51:42
合計ジャッジ時間 4,303 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 19 ms
7,792 KB
testcase_01 AC 32 ms
7,788 KB
testcase_02 AC 28 ms
7,928 KB
testcase_03 AC 50 ms
7,740 KB
testcase_04 AC 16 ms
7,792 KB
testcase_05 AC 15 ms
7,872 KB
testcase_06 AC 16 ms
7,828 KB
testcase_07 AC 16 ms
7,936 KB
testcase_08 AC 17 ms
7,788 KB
testcase_09 AC 40 ms
7,780 KB
testcase_10 AC 528 ms
7,888 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