#include <iostream>
#include <cstdlib>
#include <cstdio>
#include <time.h>
using namespace std;
char c[3];
bool f(char a,char b){
int n1,n2;
n1=n2=0;
if(a==c[0])n1++;
else if(a==c[1]&&b!=c[1])n2++;
if(b==c[1])n1++;
else if(b==c[0]&&a!=c[0])n2++;
printf("%dA%dB\n",n1,n2);
if(n1==2)return true;
else return false;
}
int main(){
srand((int)time(0));
int aa=rand()%100;
memset(c,0,sizeof(c));
c[0]=aa/10+'0';
c[1]=aa%10+'0';
char a,b;
for(int i=0;i<6&&cin>>a>>b;i++){
if(f(a,b))break;
}
}
猜数
最新推荐文章于 2024-08-05 17:47:14 发布