結果

問題 No.3028 No.9999
ユーザー flippergo
提出日時 2025-03-04 21:19:41
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 207 bytes
コンパイル時間 742 ms
コンパイル使用メモリ 82,180 KB
実行使用メモリ 60,072 KB
最終ジャッジ日時 2025-03-04 21:19:47
合計ジャッジ時間 4,998 ms
ジャッジサーバーID
(参考情報)
judge1 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 21 WA * 2
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())
if N==1 or N==3 or N==9:
    print(1)
else:
    n = 1
    cnt = 1
    for k in range(2,N+1):
        n = (n*10)%N
        cnt += n
        if cnt%N==0:
            print(k)
            break
0