結果
問題 | No.522 Make Test Cases(テストケースを作る) |
ユーザー | Grenache |
提出日時 | 2017-06-03 01:25:00 |
言語 | Java21 (openjdk 21) |
結果 |
AC
|
実行時間 | 622 ms / 2,000 ms |
コード長 | 704 bytes |
コンパイル時間 | 5,091 ms |
コンパイル使用メモリ | 77,084 KB |
実行使用メモリ | 64,216 KB |
最終ジャッジ日時 | 2023-10-22 02:18:55 |
合計ジャッジ時間 | 10,109 ms |
ジャッジサーバーID (参考情報) |
judge11 / judge13 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 237 ms
58,468 KB |
testcase_01 | AC | 276 ms
60,924 KB |
testcase_02 | AC | 274 ms
61,156 KB |
testcase_03 | AC | 313 ms
61,316 KB |
testcase_04 | AC | 173 ms
58,124 KB |
testcase_05 | AC | 173 ms
58,188 KB |
testcase_06 | AC | 172 ms
58,324 KB |
testcase_07 | AC | 179 ms
58,608 KB |
testcase_08 | AC | 193 ms
58,360 KB |
testcase_09 | AC | 284 ms
60,948 KB |
testcase_10 | AC | 622 ms
64,216 KB |
ソースコード
import java.io.*; import java.util.*; public class Main_yukicoder522 { private static Scanner sc; private static Printer pr; private static void solve() { int n = sc.nextInt(); for (int a = 1; a < n; a++) { for (int b = a; b < n; b++) { int c = n - a - b; if (c >= b) { // pr.printf("%d %d %d\n", a, b, c); pr.println(a + " " + b + " " + c); } } } } // --------------------------------------------------- public static void main(String[] args) { sc = new Scanner(System.in); pr = new Printer(System.out); solve(); pr.close(); sc.close(); } private static class Printer extends PrintWriter { Printer(PrintStream out) { super(out); } } }