結果

問題 No.373 かけ算と割った余り
ユーザー GrenacheGrenache
提出日時 2016-06-08 19:43:22
言語 Java21
(openjdk 21)
結果
AC  
実行時間 121 ms / 2,000 ms
コード長 410 bytes
コンパイル時間 2,995 ms
コンパイル使用メモリ 74,664 KB
実行使用メモリ 41,448 KB
最終ジャッジ日時 2024-04-17 12:10:21
合計ジャッジ時間 4,425 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 121 ms
41,296 KB
testcase_01 AC 118 ms
40,240 KB
testcase_02 AC 116 ms
40,204 KB
testcase_03 AC 119 ms
41,448 KB
testcase_04 AC 121 ms
41,228 KB
testcase_05 AC 111 ms
40,004 KB
testcase_06 AC 111 ms
40,220 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;


public class Main_yukicoder373 {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        long a = sc.nextInt();
        long b = sc.nextInt();
        long c = sc.nextInt();
        long d = sc.nextInt();

        long ret = (a % d) * (b % d) % d;
        ret = ret * (c % d) % d;

        System.out.println(ret);

        sc.close();
    }
}
0