結果

問題 No.373 かけ算と割った余り
ユーザー RinRin
提出日時 2016-09-02 17:42:31
言語 Java21
(openjdk 21)
結果
AC  
実行時間 125 ms / 2,000 ms
コード長 407 bytes
コンパイル時間 4,779 ms
コンパイル使用メモリ 72,320 KB
実行使用メモリ 56,124 KB
最終ジャッジ日時 2023-08-09 20:29:41
合計ジャッジ時間 6,343 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 125 ms
55,896 KB
testcase_01 AC 124 ms
55,896 KB
testcase_02 AC 120 ms
55,756 KB
testcase_03 AC 122 ms
56,124 KB
testcase_04 AC 120 ms
55,796 KB
testcase_05 AC 117 ms
56,092 KB
testcase_06 AC 123 ms
56,056 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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

public class a {
	public static void main(String args[]){
		Scanner sc = new Scanner(System.in);
		BigInteger a = sc.nextBigInteger();
		BigInteger b = sc.nextBigInteger();
		BigInteger c = sc.nextBigInteger();
		BigInteger d = sc.nextBigInteger();
		BigInteger foo = a.multiply(b).mod(d).multiply(c).mod(d);
		System.out.println(foo.toString());
	}
}
0