結果

問題 No.373 かけ算と割った余り
ユーザー GrenacheGrenache
提出日時 2016-06-08 19:43:22
言語 Java19
(openjdk 21)
結果
AC  
実行時間 130 ms / 2,000 ms
コード長 410 bytes
コンパイル時間 3,110 ms
コンパイル使用メモリ 71,292 KB
実行使用メモリ 56,180 KB
最終ジャッジ日時 2023-07-30 10:46:59
合計ジャッジ時間 4,722 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 122 ms
55,968 KB
testcase_01 AC 124 ms
55,468 KB
testcase_02 AC 126 ms
55,852 KB
testcase_03 AC 130 ms
55,716 KB
testcase_04 AC 128 ms
55,684 KB
testcase_05 AC 124 ms
56,180 KB
testcase_06 AC 125 ms
55,680 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