Run ID 作者 问题 语言 测评结果 分数 时间 内存 代码长度 提交时间
99058 梁晨熙 二进制半整数 C++ 通过 100 4 MS 252 KB 356 2023-08-21 17:16:07

Tests(5/5):


#include<bits/stdc++.h> using namespace std; #define int long long int t,n; signed main(){ cin>>t; while(t--){ int ans=0; cin>>n; if(n==1){ cout<<"no"<<endl; continue; } while(n!=0){ while(!(n&1)){ n=n>>1; } n--; ans++; } if(ans<=2) cout<<"yes"<<endl; else cout<<"no"<<endl; } return 0; }


测评信息: