結果

問題 No.373 かけ算と割った余り
ユーザー h_tyokinuhata
提出日時 2016-10-30 23:39:51
言語 Java
(openjdk 23)
結果
AC  
実行時間 113 ms / 2,000 ms
コード長 593 bytes
コンパイル時間 1,915 ms
コンパイル使用メモリ 74,216 KB
実行使用メモリ 54,076 KB
最終ジャッジ日時 2024-11-24 23:53:06
合計ジャッジ時間 3,256 ms
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 5
権限があれば一括ダウンロードができます

ソースコード

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