| Run ID | 作者 | 问题 | 语言 | 测评结果 | 分数 | 时间 | 内存 | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|---|
| 38437 | daimo | 【S】T1 | C++ | 通过 | 100 | 95 MS | 272 KB | 571 | 2025-10-08 14:14:08 |
#include<bits/stdc++.h> #define int long long using namespace std; void testread(){ freopen("xor.in","r",stdin); freopen("xor.out","w",stdout); } signed main(){ //testread(); ios::sync_with_stdio(0),cin.tie(0),cout.tie(0); int n; cin>>n; int ans1=0; for(int i=5;i<=n;i++){ for(int j=i<<1;j<=n-i;j+=i){ if(i+j==(j^i)){ ans1++; j+=i; } } } cout<<ans1+(n-1)/2+(n-2)/4+(n-3)/12+(n-4)/8<<endl; return 0; }