結果

問題 No.373 かけ算と割った余り
ユーザー atkrym
提出日時 2016-11-07 21:35:13
言語 Java
(openjdk 23)
結果
WA  
実行時間 -
コード長 446 bytes
コンパイル時間 1,785 ms
コンパイル使用メモリ 74,308 KB
実行使用メモリ 54,072 KB
最終ジャッジ日時 2024-11-25 04:30:36
合計ジャッジ時間 3,123 ms
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 3 WA * 2
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

public class Main {
    private static Scanner sc = new Scanner(System.in);
    public static void main(String[] args) throws Exception {
        int a = sc.nextInt();
        int b = sc.nextInt();
        int c = sc.nextInt();
        int d = sc.nextInt();
        int ret = mod(mod(a,d)*mod(b,d)*mod(c,d),d);
        System.out.println(ret);
    }
    
    public static int mod(int a, int b) {
        return a%b;
    }
}
0