#include<stdio.h>
int main()
{
double h,w,t;
scanf("%lf %lf",&w,&h);
t=w/(h*h);
if(t>25)
printf("%.1lf\nPANG",t);
else
printf("%.1lf\nHai Xing",t);
return 0;
}
#include<stdio.h>
int main()
{
int n;
scanf("%d",&n);
while(n--)
{
int t,x=0,y=0;
scanf("%d",&t);
x+=t/100000;
x+=(t%100000)/10000;
x+=(t%10000)/1000;
y+=(t%1000)/100;
y+=(t%100)/10;
y+=t%10;
if(x==y)
printf("You are lucky!\n");
else
printf("Wish you good luck.\n");
}
return 0;
}
#include<stdio.h>
int main()
{
int n;
scanf("%d",&n);
while(n--)
{
int t,h,w;
scanf("%d %d %d",&t,&h,&w);
if(t==0)
{
if(h<129)
printf("duo chi yu! ");
else if(h==129)
printf("wan mei! ");
else
printf("ni li hai! ");
if(w<25)
printf("duo chi rou!\n");
else if(w==25)
printf("wan mei!\n");
else
printf("shao chi rou!\n");
}
else
{
if(h<130)
printf("duo chi yu! ");
else if(h==130)
printf("wan mei! ");
else
printf("ni li hai! ");
if(w<27)
printf("duo chi rou!\n");
else if(w==27)
printf("wan mei!\n");
else
printf("shao chi rou!\n");
}
}
return 0;
}
#include<bits/stdc++.h>
using namespace std;
int main()
{
int n;
scanf("%d",&n);
while(n--)
{
char s[1005];
getchar();
scanf("%[^\n]",s);
printf("%s\n",s);
int len=strlen(s);
for(int i=0;i<len;i++)
{
if(s[i]==' '&&(s[i+1]==' '||s[i+1]==','||s[i+1]=='?'||s[i+1]=='!'||s[i+1]=='.'||s[i+1]==39||i==0))
{
len--;
for(int j=i;j<len;j++)
{
s[j]=s[j+1];
}
i--;
}
}
printf("AI: ");
for(int i=0;i<len;i++)
{
int f=1;
if(s[i]>='A'&&s[i]<='Z'&&s[i]!='I')
s[i]+=32;
if((i==0||s[i-1]==' '||s[i-1]==','||s[i-1]=='?'||s[i-1]=='!'||s[i-1]=='.')&&s[i]=='c'&&s[i+1]=='a'&&s[i+2]=='n'&&s[i+3]==' '&&s[i+4]=='y'&&s[i+5]=='o'&&s[i+6]=='u'&&(s[i+7]==' '||s[i+7]==','||s[i+7]=='?'||s[i+7]=='!'||s[i+7]=='.'))
{
f=0;
printf("I can");
i+=6;
}
if((i==0||s[i-1]==' '||s[i-1]==','||s[i-1]=='?'||s[i-1]=='!'||s[i-1]=='.')&&s[i]=='c'&&s[i+1]=='o'&&s[i+2]=='u'&&s[i+3]=='l'&&s[i+4]=='d'&&s[i+5]==' '&&s[i+6]=='y'&&s[i+7]=='o'&&s[i+8]=='u'&&(s[i+9]==' '||s[i+9]==','||s[i+9]=='?'||s[i+9]=='!'||s[i+9]=='.'))
{
f=0;
printf("I could");
i+=8;
}
if((i==0||s[i-1]==' '||s[i-1]==','||s[i-1]=='?'||s[i-1]=='!'||s[i-1]=='.')&&s[i]=='I'&&(s[i+1]==' '||s[i+1]==','||s[i+1]=='?'||s[i+1]=='!'||s[i+1]=='.'))
{
f=0;
printf("you");
}
if((i==0||s[i-1]==' '||s[i-1]==','||s[i-1]=='?'||s[i-1]=='!'||s[i-1]=='.')&&s[i]=='m'&&s[i+1]=='e'&&(s[i+2]==' '||s[i+2]==','||s[i+2]=='?'||s[i+2]=='!'||s[i+2]=='.'))
{
f=0;
printf("you");
i+=1;
}
if(s[i]=='?')
{
f=0;
printf("!");
}
if(f==1)
printf("%c",s[i]);
}
printf("\n");
}
return 0;
}
#include<bits/stdc++.h>
using namespace std;
int main()
{
printf("Talk is cheap. Show me the code.");
return 0;
}