fork download
  1. #include <iostream>
  2. #include <vector>
  3. #include <map>
  4. #include <algorithm>
  5. #include <set>
  6. using namespace std;
  7. typedef long long ll;
  8.  
  9. int main() {
  10. int t;
  11. cin >> t;
  12. while(t--){
  13. ll n, ans = 1;
  14. cin >> n;
  15. while(n > 3){
  16. n /= 4;
  17. ans *= 2;
  18. }
  19. cout << ans << endl;
  20. }
  21. }
Success #stdin #stdout 0s 5288KB
stdin
4 1 5 16 1000000000000000000
stdout
1
2
4
536870912