思路:
博弈。
实现:
#include<bits/stdc++.h> using namespace std; int main() { int t; cin >> t; while (t--) { int n; cin >> n; if (n & 1) { cout << "Bob" << endl; continue; } int cnt = 0; while (n % 2 == 0) { n >>= 1; cnt++; } if (n == 1) cout << (cnt & 1 ? "Bob": "Alice") << endl; else cout << "Alice" << endl; } return 0; }