遇到神秘人……
  • 板块灌水区
  • 楼主xiao999yao
  • 当前回复18
  • 已保存回复18
  • 发布时间2024/10/6 21:18
  • 上次更新2024/10/6 23:12:44
查看原帖
遇到神秘人……
1062722
xiao999yao楼主2024/10/6 21:18

……和他的神秘马蜂:

#include <bits/stdc++.h>
#define int long long
#define pb push_back
using namespace stdint read(int x = 0, int f = 0, char ch = getchar()) {while (ch < 48 or 57 < ch) f = ch == 45, ch = getchar();while(48 <= ch and ch <= 57) x = x * 10 + ch - 48, ch = getchar();return f ? -x : x;}void solve() {int n = read(), ans=0;for (int i = 2; i <= n; i ++) {int k = n / i;for (int j = 1; j <= k; j++) {int t = i * j;if ((t ^ (t - j)) == j) {ans++;}}}cout << ans << '\n';}main()solve();

旁边的人看了直呼dalao马蜂,是人都看不懂

2024/10/6 21:18
加载中...