- 数字谜题
30分求条
- 2025-5-25 14:58:38 @
rt
#include<bits/stdc++.h>
using namespace std;
int main() {
//freopen("number.in","r",stdin);
//freopen("number.out","w",stdout);
ios::sync_with_stdio(0);cin.tie(0);cout.tie(0);
long long T,x,ans,Ans;cin>>T;
while(T--){
cin>>x;ans=Ans=0;
for(int i=0;(1<<i)<=x;i++){
if(x&(1<<i)){
ans++;Ans=max(ans,Ans);
}
else ans=0;
}
cout<<Ans<<endl;
}
}
2 条评论
-
2025cysy16 LV 3 @ 2025-5-25 15:06:22已修改
已AC,此贴结
笑点解析:十年OI一场空,__________
-
2025-5-25 14:58:50@
TLE
- 1
信息
- ID
- 138
- 时间
- 1000ms
- 内存
- 256MiB
- 难度
- 3
- 标签
- (无)
- 递交数
- 36
- 已通过
- 20
- 上传者