Woburn Challenge 2015-16 Round 2 - Junior Division

Problem IV: A New Hope

“It is a period of civil war. Rebel programs, striking from a hidden computer, have won their first victory against the evil System Tests.”

You might be aware that the events of the Star Wars saga took place a long time ago, in a galaxy that was rather far away. But just how far away was it? We can try to describe it by repeating the word "far" a certain number of times in the following sentence format:

A long time ago in a galaxy far, far away...

In the above example, the word "far" is repeated twice. However, we'd instead like to repeat it exactly N (1 ≤ N ≤ 5) times without changing the rest of the sentence at all. There should be a comma right after each occurrence except for the last one.

Given N, can you produce the correct sentence?

Input Format

The input consists of a single integer N.

Output Format

Output on a single line the appropriate sentence with "far" repeated N times. It must match the correct answer exactly!

Sample Input 1

1

Sample Output 1

A long time ago in a galaxy far away...

Sample Input 2

4

Sample Output 2

A long time ago in a galaxy far, far, far, far away...

All Submissions
Best Solutions


Point Value: 3
Time Limit: 2.00s
Memory Limit: 16M
Added: Dec 12, 2015
Author: SourSpinach

Languages Allowed:
C++03, PAS, C, HASK, ASM, RUBY, PYTH2, JAVA, PHP, SCM, CAML, PERL, C#, C++11, PYTH3

Comments (Search)

Whenever i output from my LinkedList it always comes out the right output except with "[" and "]" someone care to tell me why is this happening?

you need to output the linkedlist at index i instead of the linkedlist it self


i tried my code on ideone.com and it worked, but i get 0 / 10 when i submit, what is wrong???????

Your answer has a small typo. Read the problem statement again.

I suggest you read the problem statement and all punctation required before you start coding

This (and the other round two problems) should probably be grouped with the other Woburn Challenge problems

Thanks for pointing that out. It's been done.