結果
| 問題 | No.167 N^M mod 10 |
| コンテスト | |
| ユーザー |
tookunn_1213
|
| 提出日時 | 2015-08-14 14:11:08 |
| 言語 | PyPy2 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 109 ms / 1,000 ms |
| コード長 | 163 bytes |
| コンパイル時間 | 129 ms |
| コンパイル使用メモリ | 77,192 KB |
| 最終ジャッジ日時 | 2025-12-03 16:11:49 |
|
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 27 |
ソースコード
N,M = input(),input() n = N % 10 li = [] now = n while now not in li: li.append(now) now *= n now %= 10 if M - 1 < 0: print 1 else: print li[(M - 1)% len(li)]
tookunn_1213