70分求调
查看原帖
70分求调
941628
Max_robot楼主2025/7/28 09:57
#include<bits/stdc++.h>
using namespace std;
long long n, k;
string s;
long long ans;
bool dame, kawaii;
int main(){
	cin>>n>>k;
	while(n--){
		cin>>s;
		ans=1;
		dame=false;
		kawaii=false;
		for(auto c:s){
			if(c=='0'){
				kawaii=true;
				break;
			}
			ans*=c-'0';
			if(ans>k){
				dame=true;
				break;
			}
		}
		if(kawaii)
			cout<<"kawaii"<<endl;
		else if(dame)
			cout<<"dame"<<endl;
		else{
			if(ans<=k)
				cout<<"kawaii"<<endl;
			else
				cout<<"dame"<<endl;
		}
	}
	return 0;
}

上述代码70分

2025/7/28 09:57
加载中...