Fill in Order Details

  • Submit paper details for free using our simple order form

Make Payment Securely

  • Add funds to your account. There are no upfront payments. The writer will only be paid once you have approved your paper

Writing Process

  • The best qualified expert writer is assigned to work on your order
  • Your paper is written to standard and delivered as per your instructions

Download your paper

  • Download the completed paper from your online account or your email
  • You can request a plagiarism and quality report along with your paper

Chef has bottles of several capacities. He likes to note down for each bottle those smaller… 1 answer below »

Chef has bottles of several capacities. He likes to note down, for each bottle, those smaller amounts that he can use to exactly divide its contents. He calls these amounts “helper amounts”.

For example, the helper amounts of a 21 L bottle are 1 L (since he can use 21 of these to divide the contents), 3 L (he can use 7 of these), and 7 L (he can use 3 of these). Similarly, a 20 L bottle has helper amounts 1, 2, 4, 5, and 10 L.

Now, Chef is superstitious and is scared of some bottles. A “spooky bottle” must satisfy two conditions. First, all of its helper amounts must have a sum strictly greater than the bottle’s capacity. Second, if Chef chooses any subset of its helper amounts, the sum must never equal the bottle’s capacity.

Chef thinks that his new shipment might have spooky bottles and is too scared to check them himself, so he calls you instead. Input

The first line has an integer T indicating the number of bottles. It is followed by T lines, each containing the capacity N of a bottle. Output

For each bottle, output a line containing SPOOKY if it is spooky or OK if it is not. Constraints 1 = T = 5001 = N = 100000 Example Input: 2 20 70 Output: OK SPOOKY

Explanation

Example case 1.
20’s helper amounts are [1, 2, 4, 5, 10] which add up to 22. The first condition is satisfied. Furthermore the subset [1, 4, 5, 10] adds up to 20, hence the second condition is violated. So 20 is not spooky.

Example case 2.
70’s helper amounts are [1, 2, 5, 7, 10, 14, 35] which add up to 74. The first condition is satisfied. Furthermore no subset of the amounts adds up to 70. The second condition is satisfied. So 70 is spooky.

WHAT OUR CURRENT CUSTOMERS SAY

  • Google
  • Sitejabber
  • Trustpilot
Zahraa S
Zahraa S
Absolutely spot on. I have had the best experience with Elite Academic Research and all my work have scored highly. Thank you for your professionalism and using expert writers with vast and outstanding knowledge in their fields. I highly recommend any day and time.
Stuart L
Stuart L
Thanks for keeping me sane for getting everything out of the way, I’ve been stuck working more than full time and balancing the rest but I’m glad you’ve been ensuring my school work is taken care of. I'll recommend Elite Academic Research to anyone who seeks quality academic help, thank you so much!
Mindi D
Mindi D
Brilliant writers and awesome support team. You can tell by the depth of research and the quality of work delivered that the writers care deeply about delivering that perfect grade.
Samuel Y
Samuel Y
I really appreciate the work all your amazing writers do to ensure that my papers are always delivered on time and always of the highest quality. I was at a crossroads last semester and I almost dropped out of school because of the many issues that were bombarding but I am glad a friend referred me to you guys. You came up big for me and continue to do so. I just wish I knew about your services earlier.
Cindy L
Cindy L
You can't fault the paper quality and speed of delivery. I have been using these guys for the past 3 years and I not even once have they ever failed me. They deliver properly researched papers way ahead of time. Each time I think I have had the best their professional writers surprise me with even better quality work. Elite Academic Research is a true Gem among essay writing companies.
Got an A and plagiarism percent was less than 10%! Thanks!

ORDER NOW


Consider Your Assignments Done

“All my friends and I are getting help from eliteacademicresearch. It’s every college student’s best kept secret!”

Jermaine Byrant
BSN

“I was apprehensive at first. But I must say it was a great experience and well worth the price. I got an A!”

Nicole Johnson
Finance & Economics

Our Top Experts

See Why Our Clients Hire Us Again And Again!


OVER

10.3k
Reviews

RATING
4.89/5
Average

YEARS
13
Mastery

Success Guarantee

When you order form the best, some of your greatest problems as a student are solved!

Reliable

Professional

Affordable

Quick

Using this writing service is legal and is not prohibited by any law, university or college policies. Services of Elite Academic Research are provided for research and study purposes only with the intent to help students improve their writing and academic experience. We do not condone or encourage cheating, academic dishonesty, or any form of plagiarism. Our original, plagiarism-free, zero-AI expert samples should only be used as references. It is your responsibility to cite any outside sources appropriately. This service will be useful for students looking for quick, reliable, and efficient online class-help on a variety of topics.