結果

問題 No.1119 Division 3
ユーザー yukiyuki
提出日時 2020-08-18 08:35:42
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 637 bytes
コンパイル時間 1,939 ms
コンパイル使用メモリ 75,388 KB
実行使用メモリ 56,040 KB
最終ジャッジ日時 2024-04-20 04:47:39
合計ジャッジ時間 4,628 ms
ジャッジサーバーID
(参考情報)
judge3 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 111 ms
54,068 KB
testcase_01 AC 112 ms
54,060 KB
testcase_02 AC 112 ms
54,224 KB
testcase_03 AC 109 ms
54,160 KB
testcase_04 WA -
testcase_05 AC 103 ms
52,832 KB
testcase_06 WA -
testcase_07 WA -
testcase_08 AC 98 ms
52,992 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 103 ms
52,980 KB
testcase_17 AC 101 ms
52,952 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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";
        }
    }

    
}
0