51nod 1067Bash游戏V2

来源:互联网 发布:oracle数据库授权 编辑:程序博客网 时间:2024/05/16 01:42

额,看到这题在明天的将课件里有,那就做一做吧

其实就是通过动归打表找规律然后就,,,,就。。。。

就直接出结果了

#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;}


1 0