結果

問題 No.373 かけ算と割った余り
ユーザー jimanojimano
提出日時 2018-02-04 16:42:23
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 588 bytes
コンパイル時間 2,787 ms
コンパイル使用メモリ 71,480 KB
実行使用メモリ 49,556 KB
最終ジャッジ日時 2023-09-12 16:03:20
合計ジャッジ時間 3,665 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 41 ms
49,180 KB
testcase_01 AC 41 ms
49,144 KB
testcase_02 AC 41 ms
49,288 KB
testcase_03 AC 41 ms
49,428 KB
testcase_04 AC 41 ms
49,108 KB
testcase_05 WA -
testcase_06 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

package me.yukicoder.lv1_5;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class No0373 {
	public static void main(String[] args) {
		try (BufferedReader br = new BufferedReader(new InputStreamReader(System.in))) {
			String[] str = br.readLine().split(" ");
			int a = Integer.parseInt(str[0]);
			int b = Integer.parseInt(str[1]);
			int c = Integer.parseInt(str[2]);
			int d = Integer.parseInt(str[3]);
			long ans = ((a * b) % d) * c % d;
			System.out.println(ans);

		} catch (IOException e) {
			e.printStackTrace();
		}
	}
}
0