結果
| 問題 | No.167 N^M mod 10 |
| コンテスト | |
| ユーザー |
🍡yurahuna
|
| 提出日時 | 2016-05-05 15:23:18 |
| 言語 | PyPy3 (7.3.23 + ACL) |
| 結果 |
RE
不安定
(最新)
AC
(最初)
|
| 実行時間 | - |
| コード長 | 203 bytes |
| 記録 | |
| コンパイル時間 | 224 ms |
| コンパイル使用メモリ | 95,944 KB |
| 実行使用メモリ | 91,040 KB |
| 最終ジャッジ日時 | 2026-09-02 01:58:30 |
| 合計ジャッジ時間 | 4,271 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 18 RE * 9 |
ソースコード
a = int(input()[-1])
m = int(input())
if m == 0:
print(1)
else:
li = [a ** (i + 1) for i in range(4)]
li = list(map(lambda x: x % 10, li))
# print(li)
print(li[(m - 1 + 4) % 4] % 10)
🍡yurahuna