标签:nbsp namespace int lin tput 个数 using style href
基准时间限制:1 秒 空间限制:131072 KB 分值: 10 难度:2级算法题
第1行:一个数T,表示后面用作输入测试的数的数量。(1 <= T <= 10000) 第2 - T + 1行:每行1个数N。(1 <= N <= 10^9)
共T行,如果A获胜输出A,如果B获胜输出B。
3 2 3 4
B A A
#include<bits/stdc++.h> using namespace std; bool ok[7]={0,1,0,1,1,1,1}; int main() { int T,s; scanf("%d",&T); while(T--) { int n; scanf("%d",&n); printf(ok[n%7]?"A\n":"B\n"); } return 0; }
标签:nbsp namespace int lin tput 个数 using style href
原文地址:http://www.cnblogs.com/ruojisun/p/6684865.html