NUMGAME2 approach

enter code here
#include
using namespace std;
#define ll int64_t

int main(void) {
ll t, n;
cin >> t;
while (t --) {
cin >> n;
if ( n % 4 == 1) {
cout << “ALICE\n”;
} else {
cout << “BOB\n”;
}
}
return 0;
}

how in this code we did n%4==1 then alice wins…please prove it mathematically…??

You can find detailed information of the solution here.

Refer to the comment section of the Editorial for the proof and explanation.