| Run ID | Author | Problem | Lang | Verdict | Score | Time | Memory | Code Length | Submit Time |
|---|---|---|---|---|---|---|---|---|---|
| 167908 | C班 郑筱橦 | 二进制半整数 | C++ | Accepted | 100 | 1 MS | 192 KB | 440 | 2024-08-19 20:38:19 |
#include<cstdio> using namespace std; typedef long long LL; int t,i; LL n,j=1; bool flag; bool judge(LL x) { LL k=1; while(k<x)k*=2; if(x==k)return true; return false; } int main() { scanf("%d",&t); for(i=1;i<=t;i++) { j=1; flag=false; scanf("%lld",&n); while(j<n) { if(judge(n-j)) { flag=true; puts("yes"); break; } j*=2; } if(!flag)puts("no"); } return 0; }