using System; using System.Collections.Generic; using System.IO; using System.Linq; class Solution { static int[] primes; static void SimpleSieve(int num) { bool[] prime = new bool[num + 1]; for (int i = 0; i < prime.Length; i++) prime[i] = true; int count = 0; for (int p = 2; p * p <= num; p++) { if (prime[p] == true) { count++; for (int i = p * 2; i <= num; i += p) prime[i] = false; } } int j = 0; int[] tempprimes = new int[num + 1]; for (int p = 2; p <= num; p++){ if (prime[p]){ tempprimes[j++] = p; } } primes = new int[j]; Array.Copy(tempprimes, 0, primes, 0, j); } static void Main(String[] args) { int g = Convert.ToInt32(Console.ReadLine()); for(int a0 = 0; a0 < g; a0++){ int n = Convert.ToInt32(Console.ReadLine()); //int sqrt = (int)Math.Sqrt(n); SimpleSieve(n); //Console.WriteLine(String.Join(",",primes)); if (primes.Length % 2 == 0) Console.WriteLine("Bob"); else Console.WriteLine("Alice"); // your code goes here } } }