結果
| 問題 | No.167 N^M mod 10 |
| コンテスト | |
| ユーザー |
ntuda
|
| 提出日時 | 2024-01-05 13:15:52 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
AC
|
| 実行時間 | 26 ms / 1,000 ms |
| コード長 | 119 bytes |
| 記録 | |
| コンパイル時間 | 188 ms |
| コンパイル使用メモリ | 85,376 KB |
| 実行使用メモリ | 52,096 KB |
| 最終ジャッジ日時 | 2026-04-14 13:00:41 |
| 合計ジャッジ時間 | 1,822 ms |
|
ジャッジサーバーID (参考情報) |
judge1_1 / judge2_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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