#include<cstdio>
#include<iostream>
#include<algorithm>
#include<cstring>
#include<cmath>
#include<vector>
#include<queue>
#include<stack>
#include<cstdlib>
#include<bitset>
#include<iomanip>
using namespace std;
int cnt,minn=1000,maxn,k;
int su[105],ttt6[30];
bool vis[105];
char word1[105];
int main (){
freopen ("word.in","r",stdin);
//freopen ("word.out","w",stdout);
scanf ("%s",word1);//here
for (int i=0;i<strlen(word1);i++)
ttt6[word1[i]-96]++;
for (int i=1;i<=26;i++)
if (ttt6[i]!=0)
{
maxn=max(maxn,ttt6[i]);
minn=min(minn,ttt6[i]);
}
k=maxn-minn;
if (k==0||k==1)
{
printf ("No Answer\n0");
return 0;
}
for (int i=2;i<=sqrt(k);i++)
if (k%i==0)
{
printf ("No Answer\n0");
return 0;
}
printf ("Lucky Word\n%d",k);
return 0;
}
NOIP 2008 T1 笨小猴
最新推荐文章于 2024-03-26 22:26:02 发布