Programming 12 Wording

Put your programming skills to the test in these challenges.

Programming 12 Wording

Post by SoggyWaterfall on Wed Oct 09, 2013 4:26 am
([msg=77638]see Programming 12 Wording[/msg])


I have countlessly read the Programming 12 challenge and cannot figure out the wording.

In this challenge, you will be given a string. Take all the numbers from the string and classify them as composite numbers or prime numbers. You should assume all numbers are one digit, and neither number 1 nor number 0 counts.

Find the sum of every composite number, then find the sum of every prime number. Multiply these sums together. Then, take the first 25 non-numeric characters of the given string and increment their ASCII value by one (for example, # becomes $). Take these 25 characters and concatenate the product to them. This is your answer.
Your answer should look like this: oc{lujxdpb%jvqrt{luruudtx140224

The part I get is in red, what I don't get is in blue. I really am lost!

Thanks :)
New User
New User
Posts: 1
Joined: Wed Oct 09, 2013 4:23 am
Blog: View Blog (0)

Re: Programming 12 Wording

Post by mShred on Wed Oct 09, 2013 11:48 am
([msg=77641]see Re: Programming 12 Wording[/msg])

Well I'm assuming you don't understand the composite/prime number business either. So I'll break it down shotgun style.

Find the sum of every composite number (number that's not prime). 8 + 4 +6 + 9 +4 = 31
Find the sum of every prime number (number that's divisible only by 1 and itself). 2 + 3 + 5 = 10
Multiply together. 310
Take the first 25 non-numeric characters and increase their ASCII value by one. abyuopkvcss = bczvpqlwdtt --check out an ASCII chart here.
Concatenate that to the product. bczvpqlwdtt . 310 = bczvpqlwdtt310.
Then you have to write a script to do all that smoothly and submit it in the form on the page pretty quickly.
For those about to hack, I salute you.
User avatar
Posts: 1822
Joined: Tue Jun 22, 2010 4:22 pm
Blog: View Blog (2)

Return to Programming

Who is online

Users browsing this forum: No registered users and 0 guests