提交时间:2023-05-20 15:17:53

运行 ID: 74077

#include<bits/stdc++.h> using namespace std; int pn,n,min; int main(){ cin>>n; if(n<2) return 0; //min int pn=n,eights=0,sixzeros=0; eights=pn/7; if(pn%7==1) eights--; pn%=7; if(pn==1) cout<<10; else if(pn==6) cout<<6; else if(pn==5) cout<<2; else if(pn==4) cout<<4; else if(pn==3) cout<<7; else if(pn==2) cout<<1; for(int i=0;i<eights;i++) cout<<8; cout<<" "; //max if(n%2==0){ int a=n/2; for(int i=0;i<a;i++){ cout<<1; } }else{ int a=n/2-1; cout<<7; for(int i=0;i<a;i++){ cout<<1; } } return 0; }