玄学之门
题目:分析:代码:
题目:
传送门
分析:
代码:
#include<iostream>
#include<cstdio>
#include<cmath>
#include<cstring>
#include<cstdlib>
#include<algorithm>
#include<set>
#include<queue>
#include<vector>
#include<map>
#include<list>
#include<ctime>
#include<iomanip>
#include<string>
#include<bitset>
#include<deque>
#include<set>
#define WYC 998244353
#define LL long long
using namespace std
;
inline LL
read() {
LL d
=0,f
=1;char s
=getchar();
while(s
<'0'||s
>'9'){if(s
=='-')f
=-1;s
=getchar();}
while(s
>='0'&&s
<='9'){d
=d
*10+s
-'0';s
=getchar();}
return d
*f
;
}
LL ans
;
int main
()
{
int n
=read();
for(int i
=1;i
<=n
/2;i
++)
for(int j
=i
*2;j
<=n
;j
+=i
)
if((i
^j
)==j
-i
) ans
++;
cout
<<ans
;
return 0;
}
转载请注明原文地址: https://www.6miu.com/read-5028634.html