結果

問題 No.373 かけ算と割った余り
ユーザー takeya_okinotakeya_okino
提出日時 2017-06-19 22:10:41
言語 Java19
(openjdk 21)
結果
AC  
実行時間 128 ms / 2,000 ms
コード長 324 bytes
コンパイル時間 1,964 ms
コンパイル使用メモリ 71,016 KB
実行使用メモリ 56,204 KB
最終ジャッジ日時 2023-07-25 13:51:31
合計ジャッジ時間 3,633 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 126 ms
55,712 KB
testcase_01 AC 127 ms
55,792 KB
testcase_02 AC 128 ms
55,544 KB
testcase_03 AC 127 ms
56,204 KB
testcase_04 AC 128 ms
55,796 KB
testcase_05 AC 126 ms
55,776 KB
testcase_06 AC 126 ms
55,756 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

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