結果

問題 No.522 Make Test Cases(テストケースを作る)
ユーザー Mcpu3Mcpu3
提出日時 2018-12-06 16:46:16
言語 Java21
(openjdk 21)
結果
AC  
実行時間 1,899 ms / 2,000 ms
コード長 322 bytes
コンパイル時間 3,132 ms
コンパイル使用メモリ 74,296 KB
実行使用メモリ 51,096 KB
最終ジャッジ日時 2023-10-12 02:47:50
合計ジャッジ時間 11,079 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 285 ms
41,892 KB
testcase_01 AC 426 ms
47,724 KB
testcase_02 AC 382 ms
44,364 KB
testcase_03 AC 576 ms
49,232 KB
testcase_04 AC 165 ms
40,644 KB
testcase_05 AC 165 ms
40,576 KB
testcase_06 AC 165 ms
40,680 KB
testcase_07 AC 192 ms
40,660 KB
testcase_08 AC 240 ms
41,100 KB
testcase_09 AC 487 ms
48,780 KB
testcase_10 AC 1,899 ms
51,096 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		sc.close();
		for (int i = 1; i < N - 1; ++i) {
			for (int j = i; j < N - i; ++j) {
				if (i + 2 * j <= N) System.out.println(i + " " + j + " " + (N - i - j));
			}
		}
	}
}
0