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

#include<stdio.h>

int isfib(int n){
	int n1, n2, s = 0, i;
	if(n == 1 || n == 2) return 1;
	n1 = 1; n2 = 2;
	for(i = 3; s < n; i++){
		s = n1 + n2;
		n1 = n2;
		n2 = s;
	}
	if(s == n) return 1;
	else return 0;
}

int main(){
	int n;
	while(scanf("%d", &n) != EOF){
		if(isfib(n)){
			printf("Lucky Day\n");
		}else{
			printf("Bad Day\n");
		}
	}
	
}