結果

問題 No.744 循環小数N桁目 Easy
ユーザー ABKZABKZ
提出日時 2021-07-27 18:41:02
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 201 bytes
コンパイル時間 865 ms
コンパイル使用メモリ 87,176 KB
実行使用メモリ 71,572 KB
最終ジャッジ日時 2023-09-30 22:14:18
合計ジャッジ時間 1,995 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 71 ms
71,376 KB
testcase_01 WA -
testcase_02 AC 72 ms
71,272 KB
testcase_03 WA -
testcase_04 WA -
testcase_05 AC 73 ms
71,328 KB
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())

n = 2
a = []
b = []
while True:
    n = n * 10
    p, q = divmod(n, 7)
    a.append(p)
    if q in b:
        break
    else:
        b.append(q)
        n = q

print(a[(N - 1) % 7])
0