Start: Jul, 10, 2019 08:30:00
2019年度暑期短学期达标测试补考
End: Jul, 10, 2019 11:30:00
Time elapsed:
Time remaining:

Problem_ID: E
Result: Accepted
Time: 43ms
Memory: 1120kB
Author: 2018212212162
In contest: 1284

#include<stdio.h>
int isfib(int n)
{
     int a[2]={1,1};
     int i=0,j=3;
     if(n==1)
         return 1;
     if(n==2)
         return 3;
     while(a[0]+a[1]<n)
     {
         a[i]=a[0]+a[1];
         i=1-i;
         j++;
     }
     if(a[0]+a[1]==n)
          return j;
     else
          return -1;
}
int main()
{
	int n;
	while(scanf("%d",&n)!=EOF)
	{
		if(isfib(n)==-1)
			printf("Bad Day\n");
		else
			printf("Lucky Day\n");
	}
}