結果

問題 No.373 かけ算と割った余り
ユーザー 4A9GN4A9GN
提出日時 2016-07-21 20:49:42
言語 Java21
(openjdk 21)
結果
AC  
実行時間 126 ms / 2,000 ms
コード長 586 bytes
コンパイル時間 1,868 ms
コンパイル使用メモリ 74,204 KB
実行使用メモリ 41,524 KB
最終ジャッジ日時 2024-04-24 00:57:00
合計ジャッジ時間 3,324 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 126 ms
41,420 KB
testcase_01 AC 120 ms
41,372 KB
testcase_02 AC 124 ms
41,524 KB
testcase_03 AC 120 ms
41,164 KB
testcase_04 AC 109 ms
41,316 KB
testcase_05 AC 125 ms
41,440 KB
testcase_06 AC 126 ms
41,452 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;
import java.math.BigInteger;

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

        BigInteger a = new BigInteger(sc.next());
        BigInteger b = new BigInteger(sc.next());
        BigInteger c = new BigInteger(sc.next());
        BigInteger d = new BigInteger(sc.next());

        BigInteger bi = new BigInteger("0");

        bi = bi.add(a);
        bi = bi.multiply(b);
        bi = bi.multiply(c);
        bi = bi.remainder(d);
        
        System.out.println(bi.toString());
    }
}
0