Advertisement
Saleh127

CF 1388B

Jul 30th, 2020
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.47 KB | None | 0 0
  1. #include <bits/stdc++.h>
  2. using namespace std;
  3. int main()
  4. {
  5. ios_base::sync_with_stdio(0);
  6. cin.tie(0);cout.tie(0);
  7.  
  8. int t;
  9. cin>>t;
  10. while(t--)
  11. {
  12. int a,c,d,e,i,j,k,l;
  13. cin>>a;
  14. if(a%4==0)
  15. {
  16. d=a/4;
  17. }
  18. else d=(a/4)+1;
  19. for(i=0;i<a-d;i++)
  20. {
  21. cout<<9;
  22. }
  23. for(i=0;i<d;i++)
  24. {
  25. cout<<8;
  26. }
  27. cout<<endl;
  28. }
  29.  
  30.  
  31. return 0;
  32. }
  33.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement