这个规律比上面更容易
#include <cstdio>
#include <iostream>
#include <cstring>
using namespace std;
int main()
{
int n,x;
while(cin>>n)
{
if(n % 2 == 0)
{
x = n / 2;
while(x--)
cout<<1;
}
else {
x = (n - 3) / 2;
cout<<7;
while(x--)
cout<<1;
}
cout<<endl;
}
return 0;
}