1 solutions

  • 0
    @ 2026-8-13 21:36:25
    #include<bits/stdc++.h>
    using namespace std;
    int main()
    {
    	int n;
    	cin>>n;
    	int cnt=0;
    	for(int x=0;x<=n;x++)
    	{
    		if(((x)^(2*x)^(3*x))==0)
    		{
    			cnt++;
    		}
    	}
    	cout<<cnt;
    	return 0;
    }
    • 1

    Information

    ID
    2859
    Time
    1000ms
    Memory
    64MiB
    Difficulty
    1
    Tags
    # Submissions
    33
    Accepted
    9
    Uploaded By