CodePudding user response:
Reference:# include
Int fun (int n)
{
If (n % 2==0 | | n % 3==0 | | n % 5==0)
return 1;
The else return 0;
}
Int main ()
{
Int I, CNT, n.
While (the scanf (" % d ", & amp; N)!=EOF & amp; & N>=1 & amp; & n<{
=10000)CNT=0;
for(i=1; CNT & lt; n; I++)
If (I==1 | | fun (I)) cnt++;
Printf (" % d \ n ", I - 1);
}
return 0;
}