結果
| 問題 |
No.167 N^M mod 10
|
| コンテスト | |
| ユーザー |
ntuda
|
| 提出日時 | 2024-01-05 13:15:52 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 39 ms / 1,000 ms |
| コード長 | 119 bytes |
| コンパイル時間 | 152 ms |
| コンパイル使用メモリ | 82,316 KB |
| 実行使用メモリ | 53,300 KB |
| 最終ジャッジ日時 | 2024-09-27 19:02:29 |
| 合計ジャッジ時間 | 2,136 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 27 |
ソースコード
N = int(input()[-1])
M = input()
if M == "0":
print(1)
exit()
M = (int(M[-2:])-1) % 100 + 1
print(pow(N,M,10))
ntuda