为什么会WA
查看原帖
为什么会WA
1020645
SongJiaLai_YWYH楼主2025/6/26 18:49

样例盒自测均正确

#include <bits/stdc++.h>
using namespace std;
int n;
int main() {
	cin>>n;
	for(int i=0;i<n;i++){
		char str[19],max='0';
		cin>>str;
		for(int i=0;str[i]!='\0';i++){
			if(str[i]>max){
				max=str[i];
			}
		}
		if(max>'1'){
			cout<<0<<' ';
		}
		else{
			cout<<1<<' ';
		}
		if(max>'7'){
			cout<<0<<' ';
		}
		else{
			cout<<1<<' ';
		}
		if(max>'8'){
			cout<<0<<' ';
		}
		else{
			cout<<1<<' ';
		}
		if(max>'F'){
			cout<<0<<' ';
		}
		else{
			cout<<1<<' ';
		}
		cout<<endl;
	}

    return 0;
}

2025/6/26 18:49
加载中...