結果

問題 No.522 Make Test Cases(テストケースを作る)
ユーザー GrenacheGrenache
提出日時 2017-06-02 22:28:15
言語 Java21
(openjdk 21)
結果
AC  
実行時間 1,228 ms / 2,000 ms
コード長 662 bytes
コンパイル時間 5,416 ms
コンパイル使用メモリ 74,720 KB
実行使用メモリ 64,904 KB
最終ジャッジ日時 2023-10-22 00:29:57
合計ジャッジ時間 11,685 ms
ジャッジサーバーID
(参考情報)
judge13 / judge10
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 264 ms
61,424 KB
testcase_01 AC 367 ms
61,580 KB
testcase_02 AC 347 ms
61,668 KB
testcase_03 AC 500 ms
64,472 KB
testcase_04 AC 137 ms
57,524 KB
testcase_05 AC 139 ms
57,032 KB
testcase_06 AC 141 ms
57,544 KB
testcase_07 AC 171 ms
55,260 KB
testcase_08 AC 239 ms
60,196 KB
testcase_09 AC 440 ms
63,084 KB
testcase_10 AC 1,228 ms
64,904 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.io.*;
import java.util.*;


public class Main_yukicoder522 {

	private static Scanner sc;
	private static Printer pr;

	private static void solve() {
		int n = sc.nextInt();

		for (int a = 1; a < n; a++) {
			for (int b = a; b < n; b++) {
				int c = n - a - b;
				if (c >= b) {
					pr.printf("%d %d %d\n", a, b, c);
				}
			}
		}
	}

	// ---------------------------------------------------
	public static void main(String[] args) {
		sc = new Scanner(System.in);
		pr = new Printer(System.out);

		solve();

		pr.close();
		sc.close();
	}

	private static class Printer extends PrintWriter {
		Printer(PrintStream out) {
			super(out);
		}
	}
}
0