結果
| 問題 |
No.167 N^M mod 10
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2025-04-22 00:22:32 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 42 ms / 1,000 ms |
| コード長 | 178 bytes |
| コンパイル時間 | 412 ms |
| コンパイル使用メモリ | 82,160 KB |
| 実行使用メモリ | 62,136 KB |
| 最終ジャッジ日時 | 2025-04-22 00:22:35 |
| 合計ジャッジ時間 | 2,859 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 27 |
ソースコード
import sys sys.set_int_max_str_digits(0) N = input() M = input() if M == "0": print(1) exit() if N[-1] == "0": print(0) exit() ans = pow(int(N), int(M), 10) print(ans)