1 solutions

  • 1
    @ 2025-12-10 19:27:55
    #include<bits/stdc++.h>
    using namespace std;
    int main()
    {
    	int n;
    	cin>>n;
    	int cnt=0;
    	for(int i=1;i<=n;i++)
    	{
    		for(int j=1;j<=i;j++)
    		{
    			if(i%2==0||j%2==0)
    			{
    				cnt++;
    			}
    		}
    	} 
    	cout<<cnt;
    	return 0;
    }

    Information

    ID
    2805
    Time
    1000ms
    Memory
    256MiB
    Difficulty
    5
    Tags
    # Submissions
    36
    Accepted
    15
    Uploaded By