結果

問題 No.167 N^M mod 10
ユーザー Ytz_IchiYtz_Ichi
提出日時 2019-06-28 16:17:26
言語 Java21
(openjdk 21)
結果
AC  
実行時間 259 ms / 1,000 ms
コード長 380 bytes
コンパイル時間 5,011 ms
コンパイル使用メモリ 73,636 KB
実行使用メモリ 58,184 KB
最終ジャッジ日時 2023-10-22 00:30:22
合計ジャッジ時間 9,217 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 111 ms
57,532 KB
testcase_01 AC 118 ms
57,272 KB
testcase_02 AC 236 ms
58,048 KB
testcase_03 AC 217 ms
58,100 KB
testcase_04 AC 210 ms
57,840 KB
testcase_05 AC 117 ms
57,408 KB
testcase_06 AC 116 ms
57,616 KB
testcase_07 AC 112 ms
57,420 KB
testcase_08 AC 117 ms
57,504 KB
testcase_09 AC 102 ms
56,260 KB
testcase_10 AC 107 ms
56,268 KB
testcase_11 AC 100 ms
55,772 KB
testcase_12 AC 110 ms
57,456 KB
testcase_13 AC 112 ms
57,288 KB
testcase_14 AC 115 ms
57,520 KB
testcase_15 AC 116 ms
57,504 KB
testcase_16 AC 108 ms
56,288 KB
testcase_17 AC 116 ms
57,528 KB
testcase_18 AC 121 ms
57,536 KB
testcase_19 AC 121 ms
57,264 KB
testcase_20 AC 115 ms
57,616 KB
testcase_21 AC 117 ms
57,476 KB
testcase_22 AC 224 ms
58,076 KB
testcase_23 AC 225 ms
57,812 KB
testcase_24 AC 203 ms
57,884 KB
testcase_25 AC 199 ms
57,992 KB
testcase_26 AC 162 ms
57,852 KB
testcase_27 AC 259 ms
58,184 KB
testcase_28 AC 215 ms
57,824 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