1 条题解
-
0
C++ :
#include <bits/stdc++.h> using namespace std; bool check(int x) { int tot = 0; for (int i = 1; i <= x; i++) if (x % i == 0) tot++; return !(tot & 1); } int main() { int n, ans = 0; cin >> n; for (int i = 1; i <= n; i++) if (check(i)) ans++; cout << ans; return 0; }
- 1
信息
- ID
- 1074
- 时间
- 1000ms
- 内存
- 256MiB
- 难度
- (无)
- 标签
- (无)
- 递交数
- 0
- 已通过
- 0
- 上传者