Practice on Toph

Participate in exhilarating programming contests, solve unique algorithm and data structure challenges and be a part of an awesome community.

Luckily Unlucky

Limits: 1s, 512 MB

Jashim is a real lucky person. He buys lottery tickets a lot and wins most of them. He buys a bunch of tickets from a single lottery. As he is doing this for a long time, he came up with a theory of winning regarding lucky and unlucky numbers.

Like most of us, he considers 7 as lucky number and 13 as unlucky number. He considers a ticket lucky if it’s serial is divisible by 7. By following this process he counts the number of lucky tickets. If the number of lucky tickets is 13, he feels unlucky and there is no chance to win that lottery. If it is any number other than 13, he feels lucky and there is a chance of winning.

Jashim is a very lazy person. He doesn’t like to work at all. So, he asked you to do a task for him.

You have to take all the serial numbers of his tickets. Then you have to count how many of them is divisible by 7. If this count (count of serial number which is divisible by 7) is 13 you have to print “Luckily Unlucky” otherwise print “Lucky”.


The first is the number of lottery tickets he bought N (13<=N<=100).

The next line contains N integers a1,a2,a3,…,an (1<=ai<=1000).


If the count of numbers divisible by 7 is equal to 13, you need to print “Luckily Unlucky”, Otherwise print “Lucky”.


7 14 21 28 35 49 42 56 70 63 84 91 77
Luckily Unlucky
1 20 25 7 15 33 55 4 8 9 63 18 100 38 84