丘跳!幼庸币观!
查看原帖
丘跳!幼庸币观!
1433769
CCY20130127楼主2025/7/27 18:10
#include<bits/stdc++.h>
using namespace std;
#define int unsigned long long
int n, k;
inline int read() {
	int x = 0, f = 1;
	char ch = getchar();
	while (ch < '0' || ch > '9') {
		if (ch == '-')
			f = -1;
		ch = getchar();
	}
	while (ch >= '0' && ch <= '9') {
		x = (x << 3) + (x << 1) + (ch ^ 48);
		ch = getchar();
	}
	return x * f;
}
inline void write(int x) {
	if (x < 0) {
		putchar('-');
		x = -x;
	}
	if (x > 9)
		write(x / 10);
	putchar(x % 10 + '0');
}
signed main() {
	ios::sync_with_stdio(0);
	cin.tie(0), cout.tie(0);
	//freopen("data.in", "r", stdin);
	//freopen("data.out", "w", stdout);
	cin >> n >> k;
	for (int i = 1; i <= n; i++) {
		string s;
		cin >> s;
		int sum = 1;
		bool f = 1;
		for (char c : s) {
			int l = c - '0';
			if (l == 0) {
				sum = 0;
				break;
			}
			sum *= l;
			if (sum > k) {
				f = 0;
				break;
			}
		}
		if (f == 1) cout << "kawaii\n";
		else cout << "dame\n";
	}
	return 0;
}

70pts

2025/7/27 18:10
加载中...