- 7的数列
- 2023-07-29 22:28:30 @
#include<bits/stdc++.h>
using namespace std;
int f[500001];
int main() {
//freopen(".in","r",stdin);
//freopen(".out","w",stdout);
int n,l=0;
cin>>n;
for(int i=1;l<100001; i++) {
int j=i;
if(j%7==0) {
f[l]=i;
l++;
}else{
while(j!=0) {
if(j%10==7) {
f[l]=i;
l++;
break;
}
j/=10;
}
}
}
cout<<f[n-1];
return 0;
}