結果
問題 |
No.373 かけ算と割った余り
|
ユーザー |
![]() |
提出日時 | 2017-05-04 06:58:26 |
言語 | Java (openjdk 23) |
結果 |
WA
|
実行時間 | - |
コード長 | 595 bytes |
コンパイル時間 | 2,486 ms |
コンパイル使用メモリ | 74,148 KB |
実行使用メモリ | 50,144 KB |
最終ジャッジ日時 | 2024-09-14 07:14:44 |
合計ジャッジ時間 | 3,041 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 3 WA * 2 |
ソースコード
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import static java.lang.System.in; public class Main { public static void main(String[] args) throws IOException { BufferedReader reader = new BufferedReader(new InputStreamReader(in)); String[] inputs = reader.readLine().split(" "); long A = Long.parseLong(inputs[0]); long B = Long.parseLong(inputs[1]); long C = Long.parseLong(inputs[2]); long D = Long.parseLong(inputs[3]); System.out.println(((A % D) * (B % D) * (C % D)) % D); } }