結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 282 ms
57,660 KB
testcase_01 AC 432 ms
63,888 KB
testcase_02 AC 379 ms
61,312 KB
testcase_03 AC 577 ms
65,060 KB
testcase_04 AC 163 ms
56,768 KB
testcase_05 AC 167 ms
56,680 KB
testcase_06 AC 165 ms
56,480 KB
testcase_07 AC 187 ms
57,012 KB
testcase_08 AC 231 ms
57,312 KB
testcase_09 AC 475 ms
64,348 KB
testcase_10 AC 1,982 ms
65,908 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