Calculator Community > Community Contests

[ENDED] Code Golf Contest #2

<< < (2/6) > >>

JWinslow23:

--- Quote from: Juju on July 23, 2014, 02:08:51 am ---Aha, down to 80 bytes! Try to beat me :P

--- End quote ---
60 in Golfscript. :P

Processing the new solution tomorrow.

Runer112:
Can we get some official clarification on input format, JWinslow23/willrandship? The main questions that come to mind are:


* Are words/clusters composed of alphanumeric characters, any printable characters, or something in between?
* Are leading, trailing, or duplicated (successive) spaces valid?
A good way to solidify all of these rules at once could be to specify a regular expression for valid input.

JWinslow23:

--- Quote from: Runer112 on July 23, 2014, 09:38:08 am ---Can we get some official clarification on input format, JWinslow23/willrandship? The main questions that come to mind are:


* Are words/clusters composed of alphanumeric characters, any printable characters, or something in between?
* Are leading, trailing, or duplicated (successive) spaces valid?
A good way to solidify all of these rules at once could be to specify a regular expression for valid input.

--- End quote ---
Well, if you use regular expressions, now you got TWO problems. :P

Words are made up of any printable characters except for the space. Trailing, leading, and repeating spaces are valid, but shall be deleted so there is only one space between words upon output.

LDStudios:

Runer112:

--- Quote from: JWinslow23 on July 23, 2014, 12:48:02 pm ---Words are made up of any printable characters except for the space. Trailing, leading, and repeating spaces are valid, but shall be deleted so there is only one space between words upon output.

--- End quote ---

Are we sure this is the official ruling? Because when I asked willrandship his thoughts in IRC yesterday, he gave basically the opposite answers; words made up of alphanumeric characters only, and no trailing, leading, or repeating spaces. I personally prefer willrandship's view, because it gives a better chance to languages that don't have string splitting/regex functions and generally allows for more golfed/hacky solutions.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version