rt
我们也可以像笨小猴那样做选择题(雾)
code:
#include<bits/stdc++.h>
using namespace std;
int zimu[26];
int maxx=-114514,minn=114514;
int jie;
bool f=true;
int main (){
string word;
cin>>word;
const int I_MAX=word.size();
for(int i=0; i<I_MAX; i++) {
zimu[word[i]-'a']++;
}
for(int i=0; i<26; i++) {
if(zimu[i]>maxx)maxx=zimu[i];
if(zimu[i]<minn)minn=zimu[i];
}
jie=maxx-minn;
for(int i=2; i*i<=jie; i++) {
if(jie%i==0) {
f=false;
break;
}
}
if(f&&jie>=2){
cout<<"Lucky Word\n"<<jie;
}else{
cout<<"No Answer\n"<<0;
}
return 0;
}