結果
| 問題 | No.167 N^M mod 10 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2025-04-22 00:22:32 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
AC
|
| 実行時間 | 68 ms / 1,000 ms |
| コード長 | 178 bytes |
| 記録 | |
| コンパイル時間 | 225 ms |
| コンパイル使用メモリ | 96,100 KB |
| 実行使用メモリ | 79,104 KB |
| 最終ジャッジ日時 | 2026-07-10 03:46:10 |
| 合計ジャッジ時間 | 3,570 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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)