'10'用什么替代???
查看原帖
'10'用什么替代???
1178004
禹天钧2016楼主2024/9/6 19:18
#include<bits/stdc++.h>
using namespace std;
int n,f1,f2,k;
string tmp;
int main() {
	cin>>n;
	for(int i=1; i<=n; i++) {
		cin>>tmp;
		f1=0;
		for(int j=0;j<tmp.size();j++){
			if(tmp[j]>='A'&&tmp[j]<='Z'){
				cout<<"0 0 0 1\n";
				f1=1;
				break;
			}
		}
		if(f1)continue;
		for(int j=0;j<tmp.size();j++){
			if(tmp[j]>='2'){
				break;
			}if(j==tmp.size()-1){
				cout<<"1 1 1 1\n";
				f1=1;
			}
		}
		if(f1)continue;
		for(int j=0;j<tmp.size();j++){
			if(tmp[j]>='8'){
				break;
			}if(j==tmp.size()-1){
				cout<<"0 1 1 1\n";
				f1=1;
			}
		}
		if(f1)continue;
		for(int j=0;j<tmp.size();j++){
			if(tmp[j]>='10'){
				break;
			}if(j==tmp.size()-1){
				cout<<"0 0 1 1\n";
				f1=1;
			}
		}
		if(f1)continue;
		cout<<"0 0 0 0\n";
	}
	return 0;
}
2024/9/6 19:18
加载中...