1 条题解
-
1
202509gj16沈齐宸 (沈齐宸) LV 6 @ 2025-10-03 11:27:12
#include<bits/stdc++.h> using namespace std; int main() { int l,r,cnt=0,sum=0; cin>>l>>r; for(int i=l;i<=r;i++) { int temp=i; sum=0; if(i==1) continue; while(temp) { if(temp%2==1) sum++; temp/=2; } cnt+=(sum<=2); } cout<<cnt; return 0; }
- 1
信息
- ID
- 2948
- 难度
- 6
- 分类
- (无)
- 标签
- 递交数
- 56
- 已通过
- 17
- 通过率
- 30%
- 上传者