結果

問題 No.522 Make Test Cases(テストケースを作る)
ユーザー kohaku_kohakukohaku_kohaku
提出日時 2017-07-17 16:42:06
言語 Java21
(openjdk 21)
結果
AC  
実行時間 1,910 ms / 2,000 ms
コード長 442 bytes
コンパイル時間 2,466 ms
コンパイル使用メモリ 76,484 KB
実行使用メモリ 53,644 KB
最終ジャッジ日時 2024-04-16 23:51:10
合計ジャッジ時間 11,031 ms
ジャッジサーバーID
(参考情報)
judge3 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 292 ms
43,612 KB
testcase_01 AC 450 ms
47,672 KB
testcase_02 AC 377 ms
46,100 KB
testcase_03 AC 531 ms
52,264 KB
testcase_04 AC 174 ms
42,288 KB
testcase_05 AC 169 ms
42,508 KB
testcase_06 AC 174 ms
42,428 KB
testcase_07 AC 169 ms
42,436 KB
testcase_08 AC 249 ms
42,968 KB
testcase_09 AC 470 ms
51,200 KB
testcase_10 AC 1,910 ms
53,644 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