結果

問題 No.251 大きな桁の復習問題(1)
ユーザー mobius_bkstmobius_bkst
提出日時 2015-07-24 22:32:31
言語 Java21
(openjdk 21)
結果
AC  
実行時間 677 ms / 5,000 ms
コード長 618 bytes
コンパイル時間 3,380 ms
コンパイル使用メモリ 74,800 KB
実行使用メモリ 56,536 KB
最終ジャッジ日時 2023-08-22 16:45:50
合計ジャッジ時間 11,886 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 41 ms
49,596 KB
testcase_01 AC 41 ms
49,588 KB
testcase_02 AC 43 ms
50,524 KB
testcase_03 AC 43 ms
50,464 KB
testcase_04 AC 41 ms
49,720 KB
testcase_05 AC 40 ms
49,372 KB
testcase_06 AC 41 ms
49,276 KB
testcase_07 AC 40 ms
49,180 KB
testcase_08 AC 40 ms
49,100 KB
testcase_09 AC 652 ms
56,508 KB
testcase_10 AC 672 ms
56,296 KB
testcase_11 AC 667 ms
56,536 KB
testcase_12 AC 654 ms
56,296 KB
testcase_13 AC 655 ms
56,388 KB
testcase_14 AC 658 ms
56,312 KB
testcase_15 AC 666 ms
54,700 KB
testcase_16 AC 655 ms
56,200 KB
testcase_17 AC 660 ms
56,028 KB
testcase_18 AC 653 ms
56,244 KB
testcase_19 AC 677 ms
56,120 KB
testcase_20 AC 45 ms
50,048 KB
testcase_21 AC 41 ms
49,504 KB
testcase_22 AC 42 ms
49,424 KB
testcase_23 AC 41 ms
49,652 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.math.BigInteger;

public class No251 {
    public static void main(String[] args) {
        try {
            BufferedReader br = new BufferedReader(new InputStreamReader(
                    System.in));
            BigInteger N = new BigInteger(br.readLine());
            BigInteger M = new BigInteger(br.readLine());

            System.out.println(N.modPow(M, BigInteger.valueOf(129402307)));

        } catch (Exception e) {
            e.printStackTrace();
            System.err.println("Error:" + e.getMessage());
        }
    }

}
0