結果
| 問題 | No.373 かけ算と割った余り |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2018-02-04 16:42:23 |
| 言語 | Java (openjdk 23) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 588 bytes |
| 記録 | |
| コンパイル時間 | 3,077 ms |
| コンパイル使用メモリ | 74,120 KB |
| 実行使用メモリ | 50,516 KB |
| 最終ジャッジ日時 | 2024-06-30 03:59:46 |
| 合計ジャッジ時間 | 3,964 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 3 WA * 2 |
ソースコード
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();
}
}
}