Advertisement
Saleh127

CF 1443A

Nov 2nd, 2020
65
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <bits/stdc++.h>
  2. using namespace std;
  3. #define ll long long
  4. #define test int t; cin>>t; for(int cs=1;cs<=t;cs++)
  5. int main()
  6. {
  7. ios_base::sync_with_stdio(0);
  8. cin.tie(0);
  9. cout.tie(0);
  10.  
  11. test
  12. {
  13. ll a,c,d=0,e,f,i,j,l;
  14. cin>>a;
  15. if(a==1) cout<<2<<endl;
  16. else if(a==2) cout<<"6 4"<<endl;
  17. else if(a==2) cout<<"6 4 10"<<endl;
  18. else
  19. {
  20. for(i=4*a; i>=4; i-=2)
  21. {
  22.  
  23. cout<<i<<" ";
  24. d++;
  25.  
  26. if(d==a) break;
  27. }
  28. cout<<endl;
  29. }
  30. }
  31.  
  32.  
  33. return 0;
  34. }
  35.  
Advertisement
RAW Paste Data Copied
Advertisement