結果

問題 No.522 Make Test Cases(テストケースを作る)
ユーザー bluemeganebluemegane
提出日時 2018-09-12 20:01:29
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 1,875 ms / 2,000 ms
コード長 417 bytes
コンパイル時間 3,377 ms
コンパイル使用メモリ 101,040 KB
実行使用メモリ 25,020 KB
最終ジャッジ日時 2023-09-09 22:13:02
合計ジャッジ時間 6,648 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 68 ms
20,780 KB
testcase_01 AC 115 ms
22,888 KB
testcase_02 AC 102 ms
24,968 KB
testcase_03 AC 182 ms
25,020 KB
testcase_04 AC 56 ms
20,716 KB
testcase_05 AC 58 ms
22,784 KB
testcase_06 AC 55 ms
20,828 KB
testcase_07 AC 56 ms
20,720 KB
testcase_08 AC 60 ms
18,620 KB
testcase_09 AC 141 ms
24,852 KB
testcase_10 AC 1,875 ms
24,768 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc)
Copyright (C) Microsoft Corporation. All rights reserved.

ソースコード

diff #

using System;

public class Hello
{
    public static void Main()
    {
        var n = int.Parse(Console.ReadLine().Trim());
        var imax = n / 3 + 1;
        for (int i = 1; i <= imax; i++)
            for (int j = i; j <= (n - i)/2 + 1; j++)
            {
                var z = n - i - j;
                if (z >= j) Console.Write("{0} {1} {2}\n", i, j, z);
                else break;
            }
    }
}
0