結果

問題 No.373 かけ算と割った余り
ユーザー htensaihtensai
提出日時 2019-11-21 08:28:43
言語 Java21
(openjdk 21)
結果
AC  
実行時間 137 ms / 2,000 ms
コード長 312 bytes
コンパイル時間 2,510 ms
コンパイル使用メモリ 78,912 KB
実行使用メモリ 41,568 KB
最終ジャッジ日時 2024-04-17 11:51:21
合計ジャッジ時間 3,749 ms
ジャッジサーバーID
(参考情報)
judge3 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 132 ms
41,288 KB
testcase_01 AC 133 ms
41,300 KB
testcase_02 AC 132 ms
41,420 KB
testcase_03 AC 135 ms
41,516 KB
testcase_04 AC 134 ms
41,360 KB
testcase_05 AC 136 ms
41,568 KB
testcase_06 AC 137 ms
41,288 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

public class Main {
	public static void main (String[] args) {
		Scanner sc = new Scanner(System.in);
		long a = sc.nextInt();
		long b = sc.nextInt();
		long c = sc.nextInt();
		long d = sc.nextInt();
		long ans = (((a % d) * (b % d)) % d * (c % d)) % d;
	    System.out.println(ans);
	}
}
0