結果
| 問題 |
No.167 N^M mod 10
|
| コンテスト | |
| ユーザー |
ntuda
|
| 提出日時 | 2024-01-05 12:57:23 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
RE
|
| 実行時間 | - |
| コード長 | 131 bytes |
| コンパイル時間 | 258 ms |
| コンパイル使用メモリ | 82,520 KB |
| 実行使用メモリ | 66,256 KB |
| 最終ジャッジ日時 | 2024-09-27 19:02:19 |
| 合計ジャッジ時間 | 2,406 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 16 WA * 1 RE * 10 |
ソースコード
R = [1, 1, 4, 4, 2, 1, 1, 4, 4, 2] N = int(input()) % 10 M = int(input()) M = (M - 1) % R[N] + 1 ans = N ** M ans %= 10 print(ans)
ntuda