[Plain] # include <stdio. h>
Int main ()
{
Int n;
Int m;
Int I;
Int t;
Int l;
Int flag;
Int count;
While (scanf ("% d", & n, & m )! = EOF & (n> 0 & n <1000000) | (m> 0 & m <1000000 ))
{
Count = 0; // calculate the number of unlucky numbers
For (I = n; I <= m; I ++)
{
Flag = 0;
T = I; // Replace I with him. This will not change the for loop.
While (t)
{
If (t % 10 = 4)
{
Count ++;
Flag = 0;
Break;
}
Else if (t % 10 = 2)
{
L = t; // replace t with t, so that the t value will not be changed. Otherwise, the calculation will fail.
L = l/10;
If (l % 10 = 6)
{
Count ++;
Break;
Flag = 1;
}
If (flag)
{
Break;
}
}
If (flag)
{
Break;
}
T = t/10;
}
}
Printf ("% d \ n", m-n-count + 1 );
}
Return 0;
}
# Include <stdio. h>
Int main ()
{
Int n;
Int m;
Int I;
Int t;
Int l;
Int flag;
Int count;
While (scanf ("% d", & n, & m )! = EOF & (n> 0 & n <1000000) | (m> 0 & m <1000000 ))
{
Count = 0; // calculate the number of unlucky numbers
For (I = n; I <= m; I ++)
{
Flag = 0;
T = I; // Replace I with him. This will not change the for loop.
While (t)
{
If (t % 10 = 4)
{
Count ++;
Flag = 0;
Break;
}
Else if (t % 10 = 2)
{
L = t; // replace t with t, so that the t value will not be changed. Otherwise, the calculation will fail.
L = l/10;
If (l % 10 = 6)
{
Count ++;
Break;
Flag = 1;
}
If (flag)
{
Break;
}
}
If (flag)
{
Break;
}
T = t/10;
}
}
Printf ("% d \ n", m-n-count + 1 );
}
Return 0;
}