結果
問題 | No.167 N^M mod 10 |
ユーザー |
![]() |
提出日時 | 2023-01-06 01:22:22 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 37 ms / 1,000 ms |
コード長 | 160 bytes |
コンパイル時間 | 306 ms |
コンパイル使用メモリ | 82,788 KB |
実行使用メモリ | 53,572 KB |
最終ジャッジ日時 | 2024-11-29 18:29:09 |
合計ジャッジ時間 | 2,243 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 27 |
ソースコード
N = input()M = "0" + input()if M == "00":print(1)exit()n = int(N[-1])if n == 0:print(0)exit()m = int(M[-3:]) + 100print(pow(n, m, 10))