Int main ()
{
Int j, index=0, I, N.
The scanf (" % d % d ", & amp; M, & amp; N);
For (I=M; i
If (I/10==0 10% & amp; & 3 * (I/100)/(I % 10)==1)
{
Index++;
continue;
}
Else if ((3 * (I/100)/(I % 10% 10 * 10 + I/10)==1))
{
Index++;
}
}
Printf (" % d \ n ", the index);
return 0;
}
Why, not to the
CodePudding user response:
Your algorithm is complex, and wrong, such as c + + plastic inside 3 * 4/11 is equal to 1,int n, m;
int index=0;
cin> N & gt;> m;
For (int I=n; I & lt;=m; I++)
{
Int h=I/100;
Int l=I % 100;
If (3 * h==l) {
cout
Index++;
}
}
cout