結果

問題 No.167 N^M mod 10
ユーザー dangodango
提出日時 2023-06-15 21:51:03
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 177 bytes
コンパイル時間 549 ms
コンパイル使用メモリ 86,788 KB
実行使用メモリ 71,644 KB
最終ジャッジ日時 2023-09-06 00:25:03
合計ジャッジ時間 3,828 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 73 ms
71,416 KB
testcase_01 AC 70 ms
71,244 KB
testcase_02 WA -
testcase_03 AC 71 ms
71,204 KB
testcase_04 AC 70 ms
71,504 KB
testcase_05 AC 73 ms
71,236 KB
testcase_06 AC 72 ms
71,344 KB
testcase_07 AC 71 ms
71,096 KB
testcase_08 AC 75 ms
71,552 KB
testcase_09 AC 74 ms
71,364 KB
testcase_10 AC 72 ms
71,100 KB
testcase_11 WA -
testcase_12 AC 72 ms
71,236 KB
testcase_13 WA -
testcase_14 WA -
testcase_15 AC 71 ms
71,640 KB
testcase_16 AC 71 ms
71,460 KB
testcase_17 AC 71 ms
71,420 KB
testcase_18 WA -
testcase_19 AC 71 ms
71,348 KB
testcase_20 WA -
testcase_21 AC 70 ms
71,264 KB
testcase_22 WA -
testcase_23 AC 71 ms
71,328 KB
testcase_24 AC 70 ms
71,248 KB
testcase_25 WA -
testcase_26 WA -
testcase_27 WA -
testcase_28 AC 73 ms
71,240 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input()[-1])
S = input()
M = 0
if S == "0":
  M = 0
else:
  M = int(S[-1])
if N == 0 and M == 0:
  print(0)
elif N != 0 and M == 0:
  print(N)
else:
  print(N ** M % 10)
0