tell me why!!!!!!!!!!!!!!!!!!!!
查看原帖
tell me why!!!!!!!!!!!!!!!!!!!!
1229623
RoYang19楼主2024/7/28 14:18
#include<bits/stdc++.h>
using namespace std;
bool base2=1,base8=1,base10=1,base16=1;
char ch[11];
int n;
int main(){
	cin>>n;
	for(int i=0;i<n;i++){
		cin>>ch;
		base2=1,base8=1,base10=1,base16=1;
		for(int j=0;j<sizeof(ch);j++){
			if(ch[j]>'1')base2=0;
			if(ch[j]>'7')base8=0;
			if(ch[j]>'9')base10=0;
			if(ch[j]>'F')base16=0;
		}
		cout<<base2<<" "<<base8<<" "<<base10<<" "<<base16<<endl;
	}
	return 0;
}
2024/7/28 14:18
加载中...