70分 三个wa 求调!!
查看原帖
70分 三个wa 求调!!
1842302
_2025WANG72楼主2025/8/31 11:09
#include <iostream>
#include <string>
using namespace std;
int main() 
{
    int n, k;
    cin >> n >> k;
    for (int i = 0; i < n; i++) 
    {
        string a;
        cin >> a;
        long long zefoc = 1;
        bool is_cute = true;
        for (char c : a) {
            int digit = c - '0';
            zefoc *= digit;
            if (zefoc > k) {
                is_cute = false;
                break;
            }
        }
        if (is_cute && zefoc <= k) {
            cout << "kawaii" << endl;
        } else {
            cout << "dame" << endl;
        }
    }
    return 0;
}
2025/8/31 11:09
加载中...