結果
| 問題 |
No.167 N^M mod 10
|
| コンテスト | |
| ユーザー |
rlangevin
|
| 提出日時 | 2023-01-06 01:21:30 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 157 bytes |
| コンパイル時間 | 292 ms |
| コンパイル使用メモリ | 82,152 KB |
| 実行使用メモリ | 53,888 KB |
| 最終ジャッジ日時 | 2024-11-29 18:28:40 |
| 合計ジャッジ時間 | 2,287 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 25 WA * 2 |
ソースコード
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))
rlangevin