标签:
20
7
14
17
#include <iostream>
using namespace std;
bool contain(int n){
while(n!=0){
if(n%10==7) {
return true;
}else{
n=n/10;
}
}
return false;
}
int main(){
int n,i;
cin>>n;
for(i=7;i<=n;i++){
if(i%7==0||contain(i)) cout<<i<<endl;
}
return 0;
}
标签:
原文地址:http://www.cnblogs.com/lchzls/p/5781713.html