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: 154ms
Memory: 1120kB
Author: 2018212212232
In contest: 1284

#include<string.h>
#include<math.h>
#include<stdlib.h>
#include<stdio.h>
int fib(int n);
int main(){
	int a[35],flag,i,j;
	for(i=0;i<35;i++){
		a[i]=fib(i);
	}
	while(scanf("%d",&j)!=EOF){
	    flag=0;
		for(i=0;i<35;i++)
			 if(a[i]==j){
				 printf("Lucky Day\n");
				 flag=1;
				 break;
			 }
			 if(flag==0)
				 printf("Bad Day\n");
			 }
}
int fib(int n){
	if(n==0||n==1)
		return n;
	else
		return fib(n-1)+fib(n-2);
}