private static int find(int n)
{
Hashtable hashmap = new Hashtable();
hashmap.Add(0, 0);
hashmap.Add(1, 1);
for (int i =1; ; i++)
{
foreach (DictionaryEntry de in hashmap)
{
int tmp =(int)( Math.Pow(10, i)) +(int)( de.Value);
int tmp2 = tmp % n;
if (tmp2 == 0)
{
return tmp;
}
if(!hashmap.Contains(tmp2 ))
hashmap.Add(tmp2,tmp);
}
}
}