結果
問題 | No.1119 Division 3 |
ユーザー | yuki |
提出日時 | 2020-08-18 09:06:31 |
言語 | Java21 (openjdk 21) |
結果 |
WA
|
実行時間 | - |
コード長 | 828 bytes |
コンパイル時間 | 6,325 ms |
コンパイル使用メモリ | 75,480 KB |
実行使用メモリ | 54,388 KB |
最終ジャッジ日時 | 2024-04-20 03:47:37 |
合計ジャッジ時間 | 4,610 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 110 ms
54,196 KB |
testcase_01 | AC | 115 ms
54,316 KB |
testcase_02 | AC | 105 ms
52,736 KB |
testcase_03 | AC | 108 ms
54,196 KB |
testcase_04 | WA | - |
testcase_05 | AC | 105 ms
54,036 KB |
testcase_06 | WA | - |
testcase_07 | WA | - |
testcase_08 | AC | 110 ms
53,968 KB |
testcase_09 | WA | - |
testcase_10 | WA | - |
testcase_11 | WA | - |
testcase_12 | WA | - |
testcase_13 | WA | - |
testcase_14 | WA | - |
testcase_15 | WA | - |
testcase_16 | AC | 109 ms
54,096 KB |
testcase_17 | AC | 105 ms
53,152 KB |
ソースコード
import java.util.*; public class Main { public static void main(String[] args) throws Exception { final int input = 3; Scanner in = new Scanner(System.in); int result = 0; List<Integer> list = new ArrayList<>(); for(int i=0; i<input; i++){ int N = in.nextInt(); final int S = 10*10*10*10*10*10*10*10*10; if(1 > N || N > S){ System.out.println("No"); return; } list.add(N); } result = list.get(0)*list.get(1)*list.get(2); System.out.println( isPrime(result) ); } public static String isPrime(int result){ if(result % 3 == 0){ return "Yes"; }else{ return "No"; } } }