結果

問題 No.522 Make Test Cases(テストケースを作る)
ユーザー RisenRisen
提出日時 2017-06-02 23:03:22
言語 C#(csc)
(csc 3.9.0)
結果
WA  
実行時間 -
コード長 530 bytes
コンパイル時間 4,960 ms
コンパイル使用メモリ 103,100 KB
実行使用メモリ 148,160 KB
最終ジャッジ日時 2023-10-22 01:27:46
合計ジャッジ時間 14,799 ms
ジャッジサーバーID
(参考情報)
judge9 / judge10
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 OLE -
testcase_02 OLE -
testcase_03 TLE -
testcase_04 -- -
testcase_05 -- -
testcase_06 -- -
testcase_07 -- -
testcase_08 -- -
testcase_09 -- -
testcase_10 -- -
権限があれば一括ダウンロードができます
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc)
Copyright (C) Microsoft Corporation. All rights reserved.

ソースコード

diff #

using System;
using System.Text;
using System.Collections.Generic;

public class Solution
{
    public static void Main()
    {
        var n = int.Parse(Console.ReadLine());
        var str = new StringBuilder();

        for (int a = 1; a * 3 <= n; a++)
        {
            for (int b = a; a + b + b <= n; b++)
            {
                for (int c = b; a + b + c <= n; c++)
                {
                    str.Append($"{a} {b} {c}");
                }
            }
        }

        Console.WriteLine(str);
    }
}
0