WC '16 Contest 1 J1 - A Spooky Season

View as PDF

Submit solution

Points: 3
Time limit: 1.0s
Memory limit: 16M

Author:
Problem type
Woburn Challenge 2016-17 Round 1 - Junior Division

Late October can be a rather frightening time of year. Night begins to fall ever earlier, ancient Pagan rituals make demons stir, and at the end of the month, hordes of small creatures can even be seen roaming the streets! It's a spooky sight if there ever was one.

But just how spooky is this demonic festival? Its spookiness level can, in fact, be measured and represented as a single integer S (2 \le S \le 20). However, a simple number doesn't truly do the spooky sensation justice. As such, it can also be described with the word spoo...ooky, with exactly S o's.

Given the integer S, can you cast a spooky incantation on your computer to have it produce the corresponding spooky word?

Input Specification

The first and only line of input consists of a single integer S.

Output Specification

Output a single line consisting of a single string – the spooky word corresponding to the given value of S.

Sample Input

5

Sample Output

spoooooky

Comments


  • 0
    SirStarshine  commented on Dec. 15, 2022, 11:28 a.m.

    The solution is absurdly simple if you understand the trick. You're literally just telling it how many times the letter "o" should be used.


  • -2
    strent  commented on Nov. 9, 2022, 7:37 a.m.

    This is very frustrating that program does not accept any text in INPUT.


  • -1
    xxdcostxx  commented on Oct. 5, 2022, 9:32 p.m.

    The instructions are pretty unclear. Formatted Strings cause it to fail despite answers being correct, if statements to manage the 2 <= S <= 20 causes it to fail... I re-wrote the program at least 15 different ways to get the same output until finally one was accepted. Am I missing something here?


    • 0
      _wcipeg  commented on Oct. 5, 2022, 11:05 p.m.

      Well, the accepted submission was the only one that had lowercase answers


  • -4
    Hackerman_567  commented on Sept. 17, 2022, 9:09 p.m.

    What is the variable name for your number input?


  • -4
    ElectroSloth  commented on July 27, 2022, 5:44 p.m. edit 2

    I am a bit lost why my submission fails all the time. From my understanding of the problem it does exactly what it's supposed to do. You input a number (between 2 and 20) and based on that you print the word spooky with the corresponding amount of "o"s. What am I missing here?


    Nevermind I figured it out, your input prompt is not supposed to say anything and just be blank. I had something like "Choose a number: " which was wrong.


  • 1
    Darknician  commented on July 3, 2022, 6:25 p.m. edited

    Trying to figure out how to limit the input to an integer between 2 and 20. That has not been covered in the book yet, to my knowledge. I have the rest figured out.

    Looks like that is not actually a requirement. The code I submitted was accepted. So why list that as a requirement?


    • 5
      BalintR  commented on July 4, 2022, 12:16 a.m. edited

      You are not the one limiting the integer. (2 \le S \le 20) means that the problem guarantees that the input given to your program will always be between 2 and 20 and you don't have to worry about making your program work for any larger values of S.


  • -5
    tappbros  commented on March 21, 2022, 10:29 p.m.

    This comment is hidden due to too much negative feedback. Show it anyway.


  • 0
    CA_marine  commented on March 21, 2022, 10:22 a.m. edited

    I'm not sure if I'm asking in the right place, but are we not able to actually view the code of other submissions?

    LE: Nevermind, figured it out, you have to first submit something yourself.


    • 2
      RAMJET_7  commented on March 21, 2022, 11:55 a.m.

      You first need to solve the question to view other submissions.


  • 1
    Code  commented on Jan. 26, 2022, 9:06 p.m.

    You know you're creativity levels have exceeded mankind expectations when you decide to use 5 append functions to solve this problem.


  • 3
    ThatsDan  commented on Jan. 22, 2022, 1:30 p.m.

    So spoooooky, indeed! ;D


  • -1
    HashDev  commented on Jan. 9, 2022, 5:01 p.m. edited

    Little bit confusing to understand the specification.

    You need to make a program to output string “o” many times using the data from your input and then add the results with string sp and sky somehow.

    GL

    HashDev


  • -1
    _wcipeg  commented on Aug. 18, 2021, 5:58 p.m. edited

    The first line is unnecessary and the 'S' in the variable Spooky should be lowercase.

    Edit: forgot to hit the reply button.