fork download
  1. #include <bits/stdc++.h>
  2. using namespace std;
  3. #define int long long int
  4. const int MOD = 1000000007;
  5.  
  6. void init_code() {
  7. #ifndef ONLINE_JUDGE
  8. freopen("input.txt", "r", stdin);
  9. freopen("output.txt", "w", stdout);
  10. #endif
  11. }
  12.  
  13. int32_t main() {
  14. init_code();
  15. int t;
  16. cin >> t;
  17. while (t--) {
  18. int n;
  19. cin >> n;
  20. //cout << 100 << " ";
  21. int ans=1;
  22. for (int i = 1; i < n+1; i++) {
  23. cout<<ans<<" ";
  24. ans=ans+2;
  25. }
  26. cout << "\n";
  27. }
  28. return 0;
  29. }
  30.  
Success #stdin #stdout 0.01s 5284KB
stdin
2
3
6
stdout
1 3 5 
1 3 5 7 9 11