結果
問題 | No.522 Make Test Cases(テストケースを作る) |
ユーザー | uafr_cs |
提出日時 | 2017-06-02 22:47:38 |
言語 | Java21 (openjdk 21) |
結果 |
WA
|
実行時間 | - |
コード長 | 727 bytes |
コンパイル時間 | 3,790 ms |
コンパイル使用メモリ | 85,064 KB |
実行使用メモリ | 58,684 KB |
最終ジャッジ日時 | 2023-10-21 22:12:14 |
合計ジャッジ時間 | 7,056 ms |
ジャッジサーバーID (参考情報) |
judge13 / judge11 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | WA | - |
testcase_01 | WA | - |
testcase_02 | WA | - |
testcase_03 | WA | - |
testcase_04 | WA | - |
testcase_05 | WA | - |
testcase_06 | WA | - |
testcase_07 | WA | - |
testcase_08 | WA | - |
testcase_09 | WA | - |
testcase_10 | WA | - |
ソースコード
import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; import java.util.HashMap; import java.util.List; import java.util.PriorityQueue; import java.util.Scanner; import java.util.TreeSet; public class Main { public static int RANGE = 100; public static void main(String[] args) { Scanner sc = new Scanner(System.in); final int N = sc.nextInt(); final int offset = 5; TreeSet<Integer> sets = new TreeSet<Integer>(); for(int i = 0; i < offset; i++){ sets.add(i + 1); sets.add(N - i); } for(final int a : sets){ for(final int b : sets){ for(final int c : sets){ if(a + b + c <= N){ System.out.println(a + " " + b + " " + c); } } } } } }