1 条题解
-
0xuyifeng LV 10 MOD @ 2017-09-16 15:20:55
//-------------------------------------------AC code-------------------------------------------//
#include<iostream> using namespace std; long long ans; int n; int main(){ cin >> n; for(int c = 1; c <= n; c++){ for(int k = 2; c * k <= n; k++){ int a = k*c; int b = a-c; if((a^b) == c) ans++; } } cout << ans; return 0; }
- 1