結果

問題 No.167 N^M mod 10
ユーザー rf141rf141
提出日時 2015-07-27 01:04:25
言語 Java21
(openjdk 21)
結果
AC  
実行時間 268 ms / 1,000 ms
コード長 271 bytes
コンパイル時間 4,474 ms
コンパイル使用メモリ 74,492 KB
実行使用メモリ 58,368 KB
最終ジャッジ日時 2023-10-21 23:51:16
合計ジャッジ時間 10,131 ms
ジャッジサーバーID
(参考情報)
judge10 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 126 ms
57,368 KB
testcase_01 AC 124 ms
57,588 KB
testcase_02 AC 268 ms
58,152 KB
testcase_03 AC 262 ms
58,368 KB
testcase_04 AC 206 ms
57,652 KB
testcase_05 AC 126 ms
57,376 KB
testcase_06 AC 131 ms
57,408 KB
testcase_07 AC 122 ms
57,188 KB
testcase_08 AC 122 ms
56,864 KB
testcase_09 AC 122 ms
57,172 KB
testcase_10 AC 124 ms
57,376 KB
testcase_11 AC 124 ms
57,348 KB
testcase_12 AC 122 ms
57,484 KB
testcase_13 AC 123 ms
57,332 KB
testcase_14 AC 123 ms
57,392 KB
testcase_15 AC 124 ms
57,368 KB
testcase_16 AC 126 ms
57,284 KB
testcase_17 AC 126 ms
57,304 KB
testcase_18 AC 126 ms
57,408 KB
testcase_19 AC 126 ms
57,340 KB
testcase_20 AC 126 ms
57,052 KB
testcase_21 AC 125 ms
57,400 KB
testcase_22 AC 242 ms
57,892 KB
testcase_23 AC 249 ms
57,860 KB
testcase_24 AC 238 ms
57,828 KB
testcase_25 AC 261 ms
57,748 KB
testcase_26 AC 159 ms
57,576 KB
testcase_27 AC 261 ms
57,944 KB
testcase_28 AC 228 ms
57,792 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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(),m = scan.next();
		System.out.println(new BigInteger(n).modPow(new BigInteger(m),BigInteger.TEN));
	}
}
0