結果

問題 No.522 Make Test Cases(テストケースを作る)
ユーザー nebukuro09nebukuro09
提出日時 2017-06-03 12:14:54
言語 D
(dmd 2.106.1)
結果
AC  
実行時間 413 ms / 2,000 ms
コード長 397 bytes
コンパイル時間 743 ms
コンパイル使用メモリ 112,768 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-06-12 19:43:42
合計ジャッジ時間 3,171 ms
ジャッジサーバーID
(参考情報)
judge3 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 4 ms
5,248 KB
testcase_01 AC 14 ms
5,376 KB
testcase_02 AC 11 ms
5,376 KB
testcase_03 AC 30 ms
5,376 KB
testcase_04 AC 1 ms
5,376 KB
testcase_05 AC 1 ms
5,376 KB
testcase_06 AC 1 ms
5,376 KB
testcase_07 AC 1 ms
5,376 KB
testcase_08 AC 2 ms
5,376 KB
testcase_09 AC 20 ms
5,376 KB
testcase_10 AC 413 ms
5,376 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import std.stdio, std.array, std.string, std.conv, std.algorithm;
import std.typecons, std.range, std.random, std.math, std.container;
import std.numeric, std.bigint, core.bitop;

void main() {
    auto N = readln.chomp.to!int;

    foreach (a; 1..N+1)
        foreach (b; 1..N+1) {
            int c = N - a - b;
            if (a <= b && b <= c && c > 0) writeln(a, " ", b, " ", c);
        }
}
0