結果
問題 | No.167 N^M mod 10 |
ユーザー |
|
提出日時 | 2015-07-27 00:58:08 |
言語 | Java21 (openjdk 21) |
結果 |
RE
|
実行時間 | - |
コード長 | 336 bytes |
コンパイル時間 | 5,908 ms |
コンパイル使用メモリ | 72,860 KB |
実行使用メモリ | 99,276 KB |
最終ジャッジ日時 | 2023-09-22 23:48:08 |
合計ジャッジ時間 | 12,161 ms |
ジャッジサーバーID (参考情報) |
judge14 / judge15 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 394 ms
64,392 KB |
testcase_01 | RE | - |
testcase_02 | RE | - |
testcase_03 | RE | - |
testcase_04 | RE | - |
testcase_05 | AC | 444 ms
59,984 KB |
testcase_06 | AC | 118 ms
56,664 KB |
testcase_07 | AC | 117 ms
56,228 KB |
testcase_08 | AC | 118 ms
56,020 KB |
testcase_09 | AC | 121 ms
56,396 KB |
testcase_10 | AC | 120 ms
56,352 KB |
testcase_11 | AC | 116 ms
56,204 KB |
testcase_12 | AC | 119 ms
56,428 KB |
testcase_13 | AC | 117 ms
56,016 KB |
testcase_14 | AC | 118 ms
56,272 KB |
testcase_15 | AC | 118 ms
55,892 KB |
testcase_16 | AC | 125 ms
56,088 KB |
testcase_17 | AC | 199 ms
58,840 KB |
testcase_18 | TLE | - |
testcase_19 | -- | - |
testcase_20 | -- | - |
testcase_21 | -- | - |
testcase_22 | -- | - |
testcase_23 | -- | - |
testcase_24 | -- | - |
testcase_25 | -- | - |
testcase_26 | -- | - |
testcase_27 | -- | - |
testcase_28 | -- | - |
ソースコード
import java.util.*; import java.math.*; public class nmMod{ public static void main(String... args){ Scanner scan = new Scanner(System.in); String n = scan.next();int m = scan.nextInt(); BigInteger N = new BigInteger(n); BigInteger base = N.pow(m); BigInteger t = new BigInteger("10"); System.out.println(base.mod(t)); } }