結果
問題 | No.186 中華風 (Easy) |
ユーザー | kenkoooo |
提出日時 | 2015-04-19 23:47:32 |
言語 | Java21 (openjdk 21) |
結果 |
WA
|
実行時間 | - |
コード長 | 563 bytes |
コンパイル時間 | 1,941 ms |
コンパイル使用メモリ | 71,548 KB |
実行使用メモリ | 58,448 KB |
最終ジャッジ日時 | 2023-09-18 01:52:21 |
合計ジャッジ時間 | 8,849 ms |
ジャッジサーバーID (参考情報) |
judge14 / judge15 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 243 ms
55,744 KB |
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 | AC | 250 ms
55,740 KB |
testcase_11 | WA | - |
testcase_12 | WA | - |
testcase_13 | WA | - |
testcase_14 | WA | - |
testcase_15 | WA | - |
testcase_16 | WA | - |
testcase_17 | WA | - |
testcase_18 | WA | - |
testcase_19 | AC | 246 ms
56,012 KB |
testcase_20 | AC | 244 ms
55,468 KB |
testcase_21 | AC | 246 ms
55,736 KB |
testcase_22 | AC | 245 ms
55,472 KB |
ソースコード
package yukicoder; import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int[] X = new int[3]; int[] Y = new int[3]; for (int i = 0; i < 3; i++) { X[i] = sc.nextInt(); Y[i] = sc.nextInt(); } sc.close(); for (long i = 1; i < 10000000; i++) { boolean check = true; for (int j = 0; j < 3; j++) { if (i % Y[j] != X[j]) { check = false; break; } } if (check) { System.out.println(i); return; } } System.out.println(-1); } }