結果
問題 |
No.167 N^M mod 10
|
ユーザー |
![]() |
提出日時 | 2015-08-14 14:04:32 |
言語 | Python2 (2.7.18) |
結果 |
WA
|
実行時間 | - |
コード長 | 164 bytes |
コンパイル時間 | 66 ms |
コンパイル使用メモリ | 7,040 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-07-18 09:22:11 |
合計ジャッジ時間 | 1,203 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 25 WA * 2 |
ソースコード
N,M = input(),input() n = N % 10 li = [] now = n while True: if now in li:break li.append(now) now *= n now %= 10 print li[(0 if M - 1 < 0 else M - 1)% len(li)]