結果

問題 No.522 Make Test Cases(テストケースを作る)
ユーザー kohaku_kohakukohaku_kohaku
提出日時 2017-07-17 16:42:06
言語 Java19
(openjdk 21)
結果
AC  
実行時間 1,908 ms / 2,000 ms
コード長 442 bytes
コンパイル時間 2,220 ms
コンパイル使用メモリ 75,604 KB
実行使用メモリ 66,116 KB
最終ジャッジ日時 2023-07-29 21:19:48
合計ジャッジ時間 10,562 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 278 ms
57,332 KB
testcase_01 AC 393 ms
63,556 KB
testcase_02 AC 366 ms
61,276 KB
testcase_03 AC 553 ms
64,316 KB
testcase_04 AC 165 ms
57,220 KB
testcase_05 AC 158 ms
56,864 KB
testcase_06 AC 158 ms
56,828 KB
testcase_07 AC 178 ms
57,192 KB
testcase_08 AC 229 ms
57,360 KB
testcase_09 AC 465 ms
64,300 KB
testcase_10 AC 1,908 ms
66,116 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

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