六十分求调
查看原帖
六十分求调
1029340
CR400BF_1145楼主2025/7/27 18:25
#include<bits/stdc++.h>
using namespace std;
int n,k;
bool f(string a)
{
    long long cnt=a[0]-'0';
    for(int i=1;i<a.size();i++)
    {
        if(a[i]=='0') return true;
        cnt*=a[i]-'0';
        if(cnt>k) return false;
    }
    return true;
}
int main()
{
    ios::sync_with_stdio(false);
    cin.tie(nullptr);
    cin>>n>>k;
    while(n--)
    {
        string s;
        cin>>s;
        if(f(s)) cout<<"kawaii"<<endl;
        else cout<<"dame"<<endl;
    }
    return 0;
}
2025/7/27 18:25
加载中...