9 solutions

  • 0
    @ 2025-7-8 9:46:43
    #include<bits/stdc++.h>
    using namespace std;
    int main()
    {
        int n;
        cin>>n;
        for(int i=1;i<=n;i++)
        {
            if(i%2==0) cout<<i<<' ';
        }
    	return 0;
    }
    

    Information

    ID
    26
    Time
    1000ms
    Memory
    256MiB
    Difficulty
    1
    Tags
    (None)
    # Submissions
    179
    Accepted
    83
    Uploaded By