結果
| 問題 |
No.373 かけ算と割った余り
|
| コンテスト | |
| ユーザー |
TatsuDX
|
| 提出日時 | 2016-09-03 14:39:47 |
| 言語 | Java (openjdk 23) |
| 結果 |
AC
|
| 実行時間 | 128 ms / 2,000 ms |
| コード長 | 334 bytes |
| コンパイル時間 | 3,818 ms |
| コンパイル使用メモリ | 77,172 KB |
| 実行使用メモリ | 41,616 KB |
| 最終ジャッジ日時 | 2024-11-15 18:39:10 |
| 合計ジャッジ時間 | 5,556 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 5 |
ソースコード
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);
}
}
TatsuDX