Codeforces 1191A. Tokitsukaze and Enhancement Solution
Solve in C++:
#include<iostream>
using namespace std;
main()
{
int n,a;
cin>>n;
a=n%4;
if(a==1)
cout<<"0 "<<"A"<<endl;
else if(a==2)
cout<<"1 "<<"B"<<endl;
else if(a==3)
cout<<"2 "<<"A"<<endl;
else if(a==0)
cout<<"1 "<<"A"<<endl;
}
#include<iostream>
using namespace std;
main()
{
int n,a;
cin>>n;
a=n%4;
if(a==1)
cout<<"0 "<<"A"<<endl;
else if(a==2)
cout<<"1 "<<"B"<<endl;
else if(a==3)
cout<<"2 "<<"A"<<endl;
else if(a==0)
cout<<"1 "<<"A"<<endl;
}
No comments