結果
| 問題 |
No.167 N^M mod 10
|
| ユーザー |
AEn
|
| 提出日時 | 2022-05-15 11:47:21 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
RE
|
| 実行時間 | - |
| コード長 | 165 bytes |
| コンパイル時間 | 311 ms |
| コンパイル使用メモリ | 82,448 KB |
| 実行使用メモリ | 67,012 KB |
| 最終ジャッジ日時 | 2024-07-26 18:59:52 |
| 合計ジャッジ時間 | 2,748 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 13 WA * 4 RE * 10 |
ソースコード
N = int(input())
M = int(input())
a = N%10
n = [a]
for i in range(5):
a *= (N%10)
a %= 10
n.append(a)
if a==(N%10):
break
print(n[M%(i+1)-1])
AEn