We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
it's working perfectly in my ide(for any case) and for 0 test case also but it's giveing some error for other test cases
but i thinke it is perfect code, so,plezz anybody can tell me wath's worng with it.
// Write Your Code Here
int sb=0,sk=0,j;
// srand(time(0));
for(int i=0;i
else
sk+=a[j];
while(j
}
if(sb>sk){
if((sb-sk)%3==0)
printf("Koca");
else
printf("Balsa");
printf("\n");
}
else{
if((sk-sb)%3==0)
printf("Balsa");
else
printf("Koca");
printf("\n");
}
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
New Year Game
You are viewing a single comment's thread. Return to all comments →
it's working perfectly in my ide(for any case) and for 0 test case also but it's giveing some error for other test cases but i thinke it is perfect code, so,plezz anybody can tell me wath's worng with it. // Write Your Code Here int sb=0,sk=0,j; // srand(time(0)); for(int i=0;i else sk+=a[j]; while(j } if(sb>sk){ if((sb-sk)%3==0) printf("Koca"); else printf("Balsa"); printf("\n"); } else{ if((sk-sb)%3==0) printf("Balsa"); else printf("Koca"); printf("\n"); }