結果

問題 No.373 かけ算と割った余り
ユーザー TatsuDXTatsuDX
提出日時 2016-09-03 14:39:47
言語 Java21
(openjdk 21)
結果
AC  
実行時間 124 ms / 2,000 ms
コード長 334 bytes
コンパイル時間 3,233 ms
コンパイル使用メモリ 71,464 KB
実行使用メモリ 55,960 KB
最終ジャッジ日時 2023-08-09 20:50:00
合計ジャッジ時間 4,616 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 123 ms
55,572 KB
testcase_01 AC 124 ms
55,936 KB
testcase_02 AC 122 ms
55,776 KB
testcase_03 AC 120 ms
55,904 KB
testcase_04 AC 121 ms
55,956 KB
testcase_05 AC 122 ms
55,960 KB
testcase_06 AC 124 ms
55,764 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

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

		long a, b, c, d, e;
		a = sc.nextLong();
		b = sc.nextLong();
		c = sc.nextLong();
		d = sc.nextLong();
		a %= d;
		b %= d;
		c %= d;
		a *= b;
		a %= d;
		a *= c;
		a %= d;
		System.out.println(a);
	}
}
0