额,看到这题在明天的将课件里有,那就做一做吧
其实就是通过动归打表找规律然后就,,,,就。。。。
就直接出结果了
#include<iostream>
#include<fstream>
#include<algorithm>
#include<cmath>
#include<cstring>
using namespace std;
int biao[]={0,1,0,1,1,1,1};
int t,n;
int main(){
cin>>t;
for(int i=1;i<=t;i++){
cin>>n;
int x=n%7;
if(biao[x]==0){
cout<<"B"<<endl;
}else{
cout<<"A"<<endl;
}
}
return 0;
}