結果
| 問題 | No.167 N^M mod 10 |
| コンテスト | |
| ユーザー |
ntuda
|
| 提出日時 | 2024-01-05 13:15:52 |
| 言語 | PyPy3 (7.3.23 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 60 ms / 1,000 ms |
| + 491µs | |
| コード長 | 119 bytes |
| 記録 | |
| コンパイル時間 | 237 ms |
| コンパイル使用メモリ | 96,336 KB |
| 実行使用メモリ | 79,000 KB |
| 最終ジャッジ日時 | 2026-09-05 08:10:32 |
| 合計ジャッジ時間 | 3,642 ms |
|
ジャッジサーバーID (参考情報) |
judge4_0 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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