My issue
if n == 6 then Alice can remove 3 form 6.So 6 - 3 = 2.Now Bob cannot remove any number so Alice should win. But when I written this code it got submitted.
My code
#include <bits/stdc++.h>
using namespace std;
int main() {
// your code goes here
int t;
cin >> t;
while (t--) {
int n, c = 0;
cin >> n;
if (n % 2 && n != 1) cout << "Alice" << endl;
else cout << "Bob" << endl;
}
return 0;
}
Problem Link: FIZZBUZZ2305 Problem - CodeChef