样例过了,全WA
查看原帖
样例过了,全WA
1165146
Linco2012楼主2024/5/11 17:31
#include<iostream>
#include<cstring>
#include<cmath>
#include<ctime>
#include<algorithm>
#include<queue>
using namespace std;
int main()
{
	string a[1001];
	int n;
	cin>>n;
	for(int i=1;i<=n;i++)    
	{
		cin>>a[i];
	}
	bool two,eight,ten,sixteen;
	for(int i=1;i<=n;i++)
	{
		two=1;
		eight=1;
		ten=1;
		sixteen=1;
		for(int j=1;j<=a[i].length();j++)
		{
			if(a[i][j]>'1')    two=0;
			if(a[i][j]>'7')    eight=0;
			if(a[i][j]>'9')    ten=0;
			if(a[i][j]>'F')    sixteen=0;
		}
		cout<<two<<" "<<eight<<" "<<ten<<" "<<sixteen<<"\n";
	}
	return 0;
}

求大佬改题

2024/5/11 17:31
加载中...