import java.util.Scanner;
public class Main
{
public static void main(String[] args)
{
Scanner sc = new Scanner(System.in);
while (sc.hasNext())
{
int n = sc.nextInt();
int count = 1;
int result = 1;
while (result % n != 0)
{
result = 10 * (result % n) + 1;
count++;
}
System.out.println(count);
}
}
}
ZOJ-1889
最新推荐文章于 2019-06-23 21:05:26 发布