結果

問題 No.167 N^M mod 10
ユーザー ぴろずぴろず
提出日時 2015-03-19 23:25:53
言語 Java21
(openjdk 21)
結果
AC  
実行時間 251 ms / 1,000 ms
コード長 317 bytes
コンパイル時間 2,321 ms
コンパイル使用メモリ 74,168 KB
実行使用メモリ 58,012 KB
最終ジャッジ日時 2023-10-21 23:36:02
合計ジャッジ時間 8,226 ms
ジャッジサーバーID
(参考情報)
judge10 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 129 ms
57,360 KB
testcase_01 AC 130 ms
57,268 KB
testcase_02 AC 249 ms
57,924 KB
testcase_03 AC 251 ms
57,948 KB
testcase_04 AC 193 ms
57,648 KB
testcase_05 AC 134 ms
57,340 KB
testcase_06 AC 130 ms
55,332 KB
testcase_07 AC 130 ms
57,356 KB
testcase_08 AC 132 ms
57,288 KB
testcase_09 AC 129 ms
57,372 KB
testcase_10 AC 131 ms
54,916 KB
testcase_11 AC 130 ms
57,080 KB
testcase_12 AC 133 ms
57,300 KB
testcase_13 AC 130 ms
57,156 KB
testcase_14 AC 134 ms
57,348 KB
testcase_15 AC 132 ms
57,308 KB
testcase_16 AC 130 ms
57,380 KB
testcase_17 AC 133 ms
57,420 KB
testcase_18 AC 130 ms
57,372 KB
testcase_19 AC 133 ms
57,320 KB
testcase_20 AC 133 ms
57,388 KB
testcase_21 AC 134 ms
55,344 KB
testcase_22 AC 235 ms
57,708 KB
testcase_23 AC 234 ms
58,012 KB
testcase_24 AC 227 ms
57,892 KB
testcase_25 AC 235 ms
57,796 KB
testcase_26 AC 170 ms
57,352 KB
testcase_27 AC 241 ms
57,948 KB
testcase_28 AC 203 ms
57,784 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

package no167;

import java.math.BigInteger;
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		BigInteger n = new BigInteger(sc.next());
		BigInteger m = new BigInteger(sc.next());
		System.out.println(n.modPow(m, BigInteger.TEN));
	}
}
0