Tongji Online Judge
Problem 1006: 敲七
#include<stdio.h>
int main()
{
int i,m,n;
scanf("%d", &n);
for(i=1; i<=n; i++){
if(i%7==0) printf("%d/n", i);
else {
m=i;
while(m){
if(m%10==7) {printf("%d/n", i); break;}
m=m/10;
}
}
}
return 0;
}