結果

問題 No.167 N^M mod 10
ユーザー purple_jwlpurple_jwl
提出日時 2015-03-21 13:37:00
言語 Java21
(openjdk 21)
結果
AC  
実行時間 294 ms / 1,000 ms
コード長 381 bytes
コンパイル時間 3,937 ms
コンパイル使用メモリ 83,056 KB
実行使用メモリ 58,096 KB
最終ジャッジ日時 2023-10-21 23:45:15
合計ジャッジ時間 8,659 ms
ジャッジサーバーID
(参考情報)
judge11 / judge10
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 137 ms
55,592 KB
testcase_01 AC 133 ms
57,232 KB
testcase_02 AC 274 ms
57,936 KB
testcase_03 AC 287 ms
58,096 KB
testcase_04 AC 230 ms
57,568 KB
testcase_05 AC 137 ms
57,352 KB
testcase_06 AC 134 ms
57,376 KB
testcase_07 AC 133 ms
57,328 KB
testcase_08 AC 136 ms
57,348 KB
testcase_09 AC 134 ms
57,496 KB
testcase_10 AC 135 ms
57,404 KB
testcase_11 AC 136 ms
57,488 KB
testcase_12 AC 132 ms
57,492 KB
testcase_13 AC 132 ms
57,392 KB
testcase_14 AC 135 ms
57,472 KB
testcase_15 AC 132 ms
57,480 KB
testcase_16 AC 140 ms
57,432 KB
testcase_17 AC 137 ms
55,476 KB
testcase_18 AC 132 ms
57,356 KB
testcase_19 AC 134 ms
57,392 KB
testcase_20 AC 137 ms
57,412 KB
testcase_21 AC 137 ms
57,508 KB
testcase_22 AC 259 ms
58,040 KB
testcase_23 AC 258 ms
57,968 KB
testcase_24 AC 255 ms
56,008 KB
testcase_25 AC 263 ms
58,020 KB
testcase_26 AC 183 ms
57,212 KB
testcase_27 AC 294 ms
57,820 KB
testcase_28 AC 223 ms
57,644 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;
import java.lang.*;
import java.math.*;

public class Main {
    
    void run() {
        Scanner sc = new Scanner(System.in);
        BigInteger N = sc.nextBigInteger();
        BigInteger M = sc.nextBigInteger();
        System.out.println(N.modPow(M, BigInteger.TEN));
    }


    public static void main(String[] args) {
        new Main().run();
    }

}
0