Lucky Stone Game

Alice and Bob are playing a stone game. They consider 4 and 7 as lucky numbers and they like to make…

Click here to read the complete problem statement.


If you need help solving this problem, mention your approach and ask specific questions. Please avoid sharing your code and asking the Community to figure out “what’s wrong”.

Continuing the discussion from Lucky Stone Game:

#include<iostream>
using namespace std;
int main()
{
    int t,m,n;
    cin>>t;
    for(int i=1;i<=t;i++){
    cin>>n>>m;
    int count=0;
    while(n>7){
        n=n-7;
        count++;
    if(n<7 && n>4){
        n=n-4;
        count=count+1;
    while(n<4 && m/3!=0){
        m=m/3;
        count=count+1;
    }}}
    if(count%2==1){
        cout<<"Case " <<i<<": Alice\n";
    }
    else {cout<<"Case "<<i<<": Bob\n";}}
}

Ei code e vul ki?