#include<iostream> using namespace std; int main() { int i,t,x,j; cin >> t; while (t--){ cin >> x; j = (x%4 != 0); for(int i=1;i<=x;i++){ cout<<(( j ? (i<x-x/4):(i<=x-x/4) )?9:8); } cout << endl; } return 0; }
https://zhuanlan.zhihu.com/p/139368825?utm_source=qq&utm_medium=social&utm_oi=1123497909743955968