結果

問題 No.167 N^M mod 10
ユーザー rlangevinrlangevin
提出日時 2023-01-06 01:21:30
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 157 bytes
コンパイル時間 308 ms
コンパイル使用メモリ 86,996 KB
実行使用メモリ 71,504 KB
最終ジャッジ日時 2023-08-19 21:54:09
合計ジャッジ時間 4,568 ms
ジャッジサーバーID
(参考情報)
judge10 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 74 ms
71,316 KB
testcase_01 AC 73 ms
71,080 KB
testcase_02 AC 72 ms
71,240 KB
testcase_03 AC 74 ms
71,184 KB
testcase_04 AC 70 ms
71,276 KB
testcase_05 AC 73 ms
71,248 KB
testcase_06 AC 74 ms
71,080 KB
testcase_07 AC 74 ms
71,316 KB
testcase_08 AC 74 ms
71,308 KB
testcase_09 AC 71 ms
71,200 KB
testcase_10 AC 72 ms
71,204 KB
testcase_11 AC 71 ms
71,060 KB
testcase_12 AC 74 ms
71,300 KB
testcase_13 AC 74 ms
71,060 KB
testcase_14 WA -
testcase_15 AC 71 ms
71,088 KB
testcase_16 AC 74 ms
71,064 KB
testcase_17 AC 72 ms
71,132 KB
testcase_18 AC 73 ms
71,128 KB
testcase_19 AC 76 ms
71,256 KB
testcase_20 AC 73 ms
71,312 KB
testcase_21 AC 72 ms
71,076 KB
testcase_22 AC 72 ms
71,128 KB
testcase_23 AC 73 ms
71,068 KB
testcase_24 AC 74 ms
71,220 KB
testcase_25 AC 72 ms
71,316 KB
testcase_26 WA -
testcase_27 AC 75 ms
71,216 KB
testcase_28 AC 74 ms
71,132 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N = input()
M = "0" + input()
if M == 0:
    print(1)
    exit()
n = int(N[-1])
if n == 0:
    print(0)
    exit()
m = int(M[-3:]) + 100
print(pow(n, m, 10))
0