結果

問題 No.522 Make Test Cases(テストケースを作る)
ユーザー Daigo HIROOKADaigo HIROOKA
提出日時 2018-06-29 10:08:26
言語 Java21
(openjdk 21)
結果
AC  
実行時間 1,903 ms / 2,000 ms
コード長 277 bytes
コンパイル時間 5,102 ms
コンパイル使用メモリ 71,900 KB
実行使用メモリ 66,348 KB
最終ジャッジ日時 2023-09-13 15:06:25
合計ジャッジ時間 12,388 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 275 ms
55,544 KB
testcase_01 AC 401 ms
62,716 KB
testcase_02 AC 353 ms
60,220 KB
testcase_03 AC 534 ms
65,816 KB
testcase_04 AC 156 ms
56,928 KB
testcase_05 AC 159 ms
56,872 KB
testcase_06 AC 159 ms
56,668 KB
testcase_07 AC 173 ms
57,140 KB
testcase_08 AC 219 ms
57,232 KB
testcase_09 AC 430 ms
63,676 KB
testcase_10 AC 1,903 ms
66,348 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

public class No522{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);

		int n = sc.nextInt();

		for(int a = 1; a <= n/3; a++){
			for(int b = a; b <= (n-a)/2; b++){
				System.out.println(a+" "+b+" "+(n-a-b));
			}
		}
	}
}
0