Run ID Author Problem Lang Verdict Score Time Memory Code Length Submit Time
159843 梁乃元 二进制半整数 C++ Wrong Answer 40 5 MS 244 KB 358 2024-07-31 21:30:36

Tests(2/5):


# include <bits/stdc++.h> using namespace std ; int main ( ) { int n , cnt = 0 , q ; cin >> q ; while ( q -- ) { cin >> n ; cnt = 0 ; while ( n > 0 ) { if ( n % 2 ) { cnt ++ ; } n >>= 1 ; } if ( cnt == 2 ) { cout << "yes" << endl ; } else { cout << "no" << endl ; } } return 0 ; }


Judgement Protocol: