結果

問題 No.373 かけ算と割った余り
ユーザー h_tyokinuhatah_tyokinuhata
提出日時 2016-10-30 23:39:51
言語 Java21
(openjdk 21)
結果
AC  
実行時間 118 ms / 2,000 ms
コード長 593 bytes
コンパイル時間 2,357 ms
コンパイル使用メモリ 74,360 KB
実行使用メモリ 41,312 KB
最終ジャッジ日時 2024-05-03 19:58:30
合計ジャッジ時間 3,773 ms
ジャッジサーバーID
(参考情報)
judge3 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 118 ms
41,312 KB
testcase_01 AC 112 ms
41,192 KB
testcase_02 AC 112 ms
41,128 KB
testcase_03 AC 117 ms
41,080 KB
testcase_04 AC 115 ms
41,008 KB
testcase_05 AC 109 ms
40,996 KB
testcase_06 AC 111 ms
41,080 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 biA = new BigInteger(sc.next());
    	BigInteger biB = new BigInteger(sc.next());
    	BigInteger biC = new BigInteger(sc.next());
    	BigInteger biD = new BigInteger(sc.next());
    	BigInteger biAns = new BigInteger("0");
    	
    	biAns = biAns.add(biA);
    	biAns = biAns.multiply(biB);
    	biAns = biAns.multiply(biC);
    	biAns = biAns.remainder(biD);
    	
    	System.out.println(biAns);
    }
}
0