結果
問題 | No.1119 Division 3 |
ユーザー |
|
提出日時 | 2020-08-18 08:35:42 |
言語 | Java (openjdk 23) |
結果 |
WA
|
実行時間 | - |
コード長 | 637 bytes |
コンパイル時間 | 2,228 ms |
コンパイル使用メモリ | 75,392 KB |
実行使用メモリ | 41,428 KB |
最終ジャッジ日時 | 2024-10-11 23:44:54 |
合計ジャッジ時間 | 5,472 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 6 WA * 10 |
ソースコード
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(); 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"; } } }