UVA 10127题目的解答
#include <iostream>
#include <cstdio>
#include <cmath>
int main()
{
int num;
while (scanf_s("%d",&num) != EOF)
{
int cnt = 2;
long long testNum = 11;
while (true)
{
if (testNum%num == 0)
{
break;
}
testNum = testNum * 10 + 1;
cnt++;
}
printf("%d\n",cnt);
}
}