Limits
1s, 256 MB

Recently Pappu saw a bunch of reviews on the “মহানগর ২” web series. With lots of curiosity, he started watching the first part. After finishing the first part he realized exam finals are approaching and he’s got huge tasks to complete. He is confused because he doesn’t want to stop watching the series as he wants to finish the second part too. As Pappu’s friend, it is your responsibility to help him decide.

Currently, Pappu has $n$ tasks to finish, numbered from $1$ to $n$. Each task has a tag number represented by $a_i.$ Pappu has a special attraction towards the last digit of any number. So, he wants to add up all the last digits of all tags. For example, if $n = 3$ and task tags are $23, 6, 100$, the last digits will be $3, 6, 0$, correspondingly, their sum is $9$.

He also has a favorite number $X$. He said that he will only do all his tasks if the $Sum$ **is a multiple of his favorite number** $X$. In other words, there must exist a non-negative integer $Y$ such that, $X \times Y = Sum$. Otherwise, he will just keep watching the series. From the above example the sum is $X = 9$ and let’s say his favorite number is $3$. Since $9$ is a multiple of $3$, he will do his tasks.

Now, your task is to calculate the $Sum$ of the last digits of all the task numbers and determine if the $Sum$ is a multiple of his favorite number of $X$.

The first line of the input contains two integers $n$ and $X$ separated by space — indicating the number of tasks and Pappu’s favorite number.

The second line of the test case contains n space-separated integers $a_1, a_2, a_3,….,a_n$ — indicating the tag number of each task.

$1$ $≤$ $n,$ $X$ $≤$ $10^5$

$1$ $≤$ $a_i$ $≤$ $10^5$

If the $Sum$ of the last digits of the tasks is a multiple of $X$, print “* Finish all the tasks, including mine!*” without quotations. If not then print “

Input | Output |
---|---|

3 7 23 4 100 | Finish all the tasks, including mine! |

Input | Output |
---|---|

5 3 67 33 90 21 9 | You can now watch the series! |

Be careful about the newline (‘\n’) at the end.

Toph uses cookies. By continuing you agree to our Cookie Policy.