Result: Accepted
Time: 60ms
Memory: 2020kB
#include<iostream>
#include<stdio.h>
#include<stdlib.h>
#include<string.h>
#include<string>
#include<math.h>
#include<cmath>
#include<time.h>
#include<map>
#include<set>
#include<vector>
#include<queue>
#include<algorithm>
#include<numeric>
const int maxn = 0x3f3f3f3f;
const double EI = 2.718281828459045235360287471352662497757247093699959574966967627724076630353547594571382178525166427;
const double PI = 3.14159265358979323846264338327950288;
using namespace std;
int main(void)
{
int n,i,c[100],zz;
c[0] = 2;
c[1] = 3;
for(i = 2;i < 50;++i)
{
c[i] = c[i - 1] + c[i - 2];
}
while(~scanf("%d",&n))
{
zz = 1;
for(i = 0;i < 50;++i)
{
if(n == c[i])
{
zz = 0;
break;
}
if(c[i] > n)
{
break;
}
}
if(zz)
{
printf("Bad Day\n");
}
else
{
printf("Lucky Day\n");
}
}
return 0;
}