B. Aleksa and Stack

原题链接

题解

我们知道奇数无法整除偶数,所以可以构造一个全是奇数的序列

code

#include<bits/stdc++.h>
#define ll long long
using namespace std;

void solve()
{
    int n;
    cin>>n;

    for(int i=1;i<=n;i++) cout<<2*i-1<<' ';
    cout<<'\n';
}
int main()
{
    ios::sync_with_stdio(false);cin.tie(0);cout.tie(0);
    int t=1;
    cin>>t;
    while(t--) solve();
    return 0;
}


posted @ 2024-07-21 13:22  纯粹的  阅读(12)  评论(0)    收藏  举报