破解成功是第几次关键是看算法怎么做,从左到右穷举和从右到左穷举结果互补
#include?<stdio.h>#define?For(i,?flag)?for(i?=?0;?i<=9?&&?flag==0;?++i)
int?main()
{
inta[6];
intcount?=?1,?flag?=?0;
char?password[7];?
scanf("%s",?password);
For(a[0],?flag)
For(a[1],?flag)
For(a[2],?flag)
For(a[3],?flag)
For(a[4],?flag)
For(a[5],?flag)
{
if(password[0]==a[0]+'0'?&&?password[1]==a[1]+'0'?&&?password[2]==a[2]+'0'
&&?password[3]==a[3]+'0'?&&?password[4]==a[4]+'0'?&&?password[5]==a[5]+'0')
{
flag?=?1;
break;
}
else
++count;
}
printf("%d",?count);
return?0;
}