/* Don't overcomplicate. */ /* Don't construct unnecessary objects. */ /* Stack is for everything. */ #include using namespace std; #define MAX(T) (std::numeric_limits::max()) using i8 = int_fast8_t; using i16 = int_fast16_t; using i32 = int_fast32_t; using i64 = int_fast64_t; using u8 = uint_fast8_t; using u16 = uint_fast16_t; using u32 = uint_fast32_t; using u64 = uint_fast64_t; using st = size_t; const std::string nl = "\n"; #define pb push_back #define eb emplace_back #define forn(n) fornn(_Temp_I_ ## __LINE__ ## __COUNTER__ ## _ ## __FILE__, (n)) #define fornn(name, n) for (size_t name{}; name < n; ++name) #define what_is(x) (std::cerr << (#x) << " is " << (x) << std::endl) int main() { std::ios_base::sync_with_stdio(0); std::cin.tie(nullptr); // disables automatic flush of std::cout before std::cin -- take care in interactive problems //std::ifstream cin("TASKNAME.in"); //std::ofstream cout("TASKNAME.out"); //std::cin.rdbuf(cin.rdbuf()); //std::cout.rdbuf(cout.rdbuf()); /*************** GOOD LUCK ***************/ st g; cin >> g; for (st i = 0; i < g; i++) { u64 n; cin >> n; vector a(n+1); u64 o = 1; for (auto& x : a) x = o++; u64 cnt = 0; for (st i = 2; i < a.size(); i++) { if (a[i]) cnt++; else continue; for (st j = i; j < a.size(); j += i) a[j] = 0; } if (cnt % 2 == 1) cout << "Alice"; else cout << "Bob"; cout << nl; } }