結果

問題 No.373 かけ算と割った余り
ユーザー takutakutakutaku
提出日時 2020-09-24 15:39:42
言語 Java21
(openjdk 21)
結果
AC  
実行時間 131 ms / 2,000 ms
コード長 490 bytes
コンパイル時間 1,974 ms
コンパイル使用メモリ 70,952 KB
実行使用メモリ 56,016 KB
最終ジャッジ日時 2023-09-10 13:28:37
合計ジャッジ時間 3,624 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 130 ms
55,728 KB
testcase_01 AC 130 ms
55,796 KB
testcase_02 AC 131 ms
55,604 KB
testcase_03 AC 128 ms
55,780 KB
testcase_04 AC 131 ms
55,316 KB
testcase_05 AC 130 ms
56,016 KB
testcase_06 AC 129 ms
55,660 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

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