Mocking SpongeBob

View as PDF

Submit solution


Points:3
Time limit:2.0s
Memory limit:62M
Author:

Problem type

Mocking Spongebob

You are a professional memer. Your memes have garnered thousands of upvotes on Reddit and have been reposted by hundreds.

Late into the night, on May 6th of 2017, you receive a call from a fellow talented memer. He informs you of a tweet that has just gone viral, depicting a mocking SpongeBob. The format of the meme is simply a line of text followed by the same line but with erratic capitalization. Excited, you take a look, and instantly you know you've stumbled upon a goldmine.

Cracking your knuckles, you get to work. You masterfully craft dozens of memes, tweeting, sharing them on Facebook, and posting them on Reddit.

Unfortunately, you feel as if you are being inefficient. You are capitalizing letters one by one, and soon your fingers are tired. You stop to reflect. What if there was a way to speed up the process?...

Suddenly, you get an idea. You've dabbled into programming, and could probably make a program that does the hard work for you.

You've got to do it quick though! Users on r/memeeconomy are saying that this meme will be dead soon, so take advantage of the internet while you still have time!

Input Specification

The first line will contain an integer (0 \le N \le 100). This will then be followed by N lines of length (0 < L < 1\,000), each of which you must turn into Mocking SpongeBob format.

Output Specification

The first letter encountered has to be turned lowercase, and all following letters are to alter between uppercase and lowercase.

Keep in mind that only letters are to be affected by this pattern. All other symbols must not affect the pattern in any way. You must also "translate" each line individually, and not the entire text together.

Output the N modified lines.

Sample Input

3
I don't even know her like that
You can't just make a new meme from a different Spongebob clip every couple of months
I must have listened to that latest Ed Sheeran song 10000 times!

Sample Output

i DoN't EvEn KnOw HeR lIkE tHaT
yOu CaN't JuSt MaKe A nEw MeMe FrOm A dIfFeReNt SpOnGeBoB cLiP eVeRy CoUpLe Of MoNtHs
i MuSt HaVe LiStEnEd To ThAt LaTeSt Ed ShEeRaN sOnG 10000 tImEs!

Comments


  • 7
    AndrewVII
     commented on June 10, 2017

    N should equal 3 in sample input 1, not 2.


    • 3
      pwnclub
       commented on June 12, 2017

      Thanks for bringing that up, fixed :)