Practice on Toph

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

Zacob The Batsman

By AnikaTahsin · Limits 500ms, 512 MB

It's known that Zacob is a reliable batsman of LU CSE Cricket Team. Also as long as he is on the crease, he becomes the matter of fear for the bowlers. But unfortunately his team has been thrown out from the quarter final in the last Leading University Inter Department Cricket Championship 2017. Now he is determined to win the Championship next year. He is also determined to score the runs hitting only 4’s and 6’s. So no singles, doubles or triples he is going to score next year.

Now he wonders whether he can score C runs if he hits some non-negative number of 4’s and 6’s. More formally, you have to find if there exists two non-negative integers x and y such that 4x + 6y = C.


The first line contain T. T states the number of test cases [1 <= T <= 100]. The next T lines will have one integers C as stated in the statement [0<=C <= 10^18].


If he can hit the score then output "Zacob Zacob!". Otherwise output "Sorry Zacob!" (Without any quotations).

For more clarification see the sample I/O.


Zacob Zacob!

                                                                                 Problem Setter- Anika Tahsin



81% Solution Ratio

sakibalaminEarliest, Jul '17

Nasif_44thFastest, 0.0s

subhashis_cseLightest, 0 B

bokaifShortest, 83B


Login to submit

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