Ankit_132

C

Jun 12th, 2024
483
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.33 KB | None | 0 0
  1. #include <bits/stdc++.h>
  2. using namespace std;
  3.  
  4. int main() {
  5.     int t;
  6.     cin>>t;
  7.    
  8.     while(t--){
  9.         int n;
  10.         cin>>n;
  11.        
  12.         if(n==1)
  13.             cout<<1<<"\n";
  14.         else
  15.         {
  16.             for(int i=0; i<n-2; i++)
  17.                 cou<<3<<t" ";
  18.             cout<<2<<" "<<1<<"\n";
  19.         }
  20.     }
  21. }
  22.  
Advertisement
Add Comment
Please, Sign In to add comment