1class Solution:2 def smallestRepunitDivByK(self, k: int) -> int:3 if k % 2 == 0:4 return -15 n = 16 leng = 17 mapp = {}8 while True:9 rem = n % k10 if rem == 0:11 return leng12 if rem in mapp:13 return -114 mapp[rem] = True15 n = n * 10 + 116 leng += 1
WPM •0 •0
ACC •0 •0
TIME •0