結果
問題 | No.167 N^M mod 10 |
ユーザー |
![]() |
提出日時 | 2022-05-15 11:49:24 |
言語 | PyPy3 (7.3.15) |
結果 |
RE
(最新)
AC
(最初)
|
実行時間 | - |
コード長 | 208 bytes |
コンパイル時間 | 562 ms |
コンパイル使用メモリ | 82,652 KB |
実行使用メモリ | 66,940 KB |
最終ジャッジ日時 | 2024-07-26 19:02:40 |
合計ジャッジ時間 | 2,791 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 17 RE * 10 |
ソースコード
N = int(input()) M = int(input()) if M == 0: print(1) exit() a = N%10 n = [a] for i in range(5): a *= (N%10) a %= 10 n.append(a) if a==(N%10): break print(n[(M%(i+1)-1)%(i+1)])