My issue
what is the error in my code
My code
#include <iostream>
using namespace std;
int main() {
// your code goes here
int t;
cin>>t;
while(t--){
int n,k;
cin>>n>>k;
int t=n%4;
if(n==0){
if(k==1){
cout<<"On"<<endl;
}
else cout<<"Off"<<endl;
continue;
}
if(k==1){
if(t>0&&t<=3){
cout<<"Ambiguous"<<endl;
}
else if(t==0){
cout<<"On"<<endl;
}
else cout<<"Off"<<endl;
}
if(k==0){
if(t>0&&t<=3){
cout<<"Ambiguous"<<endl;
}
else cout<<"Off"<<endl;
}
}
return 0;
}
Problem Link: DARLIG Problem - CodeChef