結果

問題 No.522 Make Test Cases(テストケースを作る)
ユーザー Daigo HIROOKADaigo HIROOKA
提出日時 2018-06-29 10:16:24
言語 Java21
(openjdk 21)
結果
AC  
実行時間 615 ms / 2,000 ms
コード長 349 bytes
コンパイル時間 3,216 ms
コンパイル使用メモリ 74,348 KB
実行使用メモリ 61,868 KB
最終ジャッジ日時 2023-09-13 15:07:02
合計ジャッジ時間 8,005 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 228 ms
57,488 KB
testcase_01 AC 257 ms
59,460 KB
testcase_02 AC 246 ms
59,604 KB
testcase_03 AC 294 ms
59,668 KB
testcase_04 AC 157 ms
56,776 KB
testcase_05 AC 156 ms
56,916 KB
testcase_06 AC 158 ms
57,348 KB
testcase_07 AC 161 ms
56,524 KB
testcase_08 AC 185 ms
56,876 KB
testcase_09 AC 260 ms
59,420 KB
testcase_10 AC 615 ms
61,868 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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

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

		int n = sc.nextInt();

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