結果

問題 No.373 かけ算と割った余り
ユーザー fkwnw3_1243fkwnw3_1243
提出日時 2017-05-04 06:58:26
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 595 bytes
コンパイル時間 2,575 ms
コンパイル使用メモリ 72,240 KB
実行使用メモリ 49,756 KB
最終ジャッジ日時 2023-10-12 08:08:07
合計ジャッジ時間 3,020 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 42 ms
49,544 KB
testcase_01 AC 42 ms
49,380 KB
testcase_02 AC 41 ms
49,756 KB
testcase_03 AC 41 ms
49,112 KB
testcase_04 AC 41 ms
49,332 KB
testcase_05 WA -
testcase_06 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

import static java.lang.System.in;

public class Main {
    public static void main(String[] args) throws IOException {
        BufferedReader reader = new BufferedReader(new InputStreamReader(in));
        String[] inputs = reader.readLine().split(" ");
        long A = Long.parseLong(inputs[0]);
        long B = Long.parseLong(inputs[1]);
        long C = Long.parseLong(inputs[2]);
        long D = Long.parseLong(inputs[3]);
        System.out.println(((A % D) * (B % D) * (C % D)) % D);
    }
}
0