蒻衿编译失败求调
#include<bits/stdc++.h>
using namespace std;
int n,c;
int main()
{
cin>>n;
for(int i=0;;t++)
{
if(n==495)
{
cout<<t<<endl;
break;
}
int q0=n%10,q1=n/10%10,q2=n/100;
int ta=0;ti=0;
if(q0>=q1&&q1>=q2)
{
ta=q0*100+q1*10+q2;
ti=m2*100+q1*10+q0;
}
else if(q0>=q2&&q2>=q1)
{
ta=q0*100+q2*10+q1;
ti=q1*100+q2*10+q0;
}
else if(q1>=q0&&q0>=q2)
{
ta=q1*100+q0*10+q2;
ti=q2*100+q0*10+q1;
}
else if(q1>=q2&&q2>=q0)
{
ta=q1*100+q2*10+q0;
ti=q0*100+q2*10+q1;
}
else if(q2>=q0&&q0>=q1)
{
ta=q2*100+q0*10+q1;
ti=q1*100+q0*10+q2;
}
else
{
ta=q2*100+q1*10+q0;
ti=q0*100+q1*10+q2;
}
n=ta-ti;
}
return 0;
}