結果

問題 No.747 循環小数N桁目 Hard
ユーザー 💕💖💞
提出日時 2018-11-22 13:40:46
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
RE  
(最新)
AC  
(最初)
実行時間 -
コード長 204 bytes
コンパイル時間 227 ms
コンパイル使用メモリ 12,544 KB
実行使用メモリ 10,880 KB
最終ジャッジ日時 2024-10-12 05:25:35
合計ジャッジ時間 6,328 ms
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 29 RE * 91
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input()) %6
K = int(input())%2
d = {1:2, 2:8, 3:5, 4:7, 5:1, 0:4}
# 数学的証明 : https://yukicoder.me/problems/no/747/editorial
if (N==2 or N==5) and K==0:
  print(d[6-N])
else:
  print(d[N])
0