Problem Description
MLGX最近突然间决定要跳楼。。。。。。。。。。。。。。。。。。。梯,一个一共100级台阶的楼梯,MLGX要从第0级跳到第100级,MLGX每一步只能跳1级或2级,假如,现在位于0级上,那么他只能一次跳到第1级或第2级上。但是现在有些台阶被弄脏了,而MLGX有洁癖啊,宁愿放弃也不愿意去踩到那些楼梯,现在给出一些脏的台阶的级数,请你判断MLGX是否能跳到100级,已知第0级是不会脏的。
Input
多组输入。每组输入第一行是脏台阶的个数n(0<=n<=100),第二行输入n个正整数,分别代表第i个台阶是脏的。(无序输入,且数字不会出现重复)
Output
若能跳到100级,输出“Orz”,若不能,输出“Why are you so ben?”。
Example Input
1 1 5 1 4 7 3 10
Example Output
Orz Why are you so ben?
Hint
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
int main()
{
int a[100];
int n, i, j, t, temp;
while(scanf("%d", &n)!=EOF)
{
t=0;temp=0;
for(i=0; i<n; i++)
scanf("%d", &a[i]);
for(i=0;i<n;i++)
{
if(a[i]==100)
{
temp++;
}
for(j=0;j<n;j++)
{
if(abs(a[j]-a[i])==1)
t++;
}
}
if(t==0&&temp==0)
printf("Orz\n");
else
printf("Why are you so ben?\n");
}
}