Ruby, 90 bytes
def f s;if s=="";return[];end;(0..9).map{|i|s+i.to_s}+f(s.chars.take(s.length-1).join);end
If the string is empty, return a empty array. Otherwise, generate the string + the number in each number from 0 to 9, and call the f with the string without the last character.
> If the string is empty, return a empty array. Otherwise, generate the string + the number in each number from 0 to 9, and call f with the string without the last character.
Remove unnecessary whitespaces
In my Jellyfish answer to this question, I golfed my program from 41 bytes down to 29 bytes just by finding alternative methods of placing the functions and operators so as to minimize the number of spaces used.
41-byte version:
p
n +
+ `1
/+&*
`/* r&;
@zyabin101 A) ... what do you think I'm doing B) I hope you haven't redirected anyone else for design help to CG, it's for the techical aspects of it. UX is for UX not design help. UX =\= UI
...posted that and then went live with a proposal that had been in the sandbox for less than two and a half hours (OK, it was well received, but still)
@JonathanAllan I want to know one thing. You take an input of a year, alright, and only the year is known, and you want us to output the day and month?
@EʀɪᴋᴛʜᴇGᴏʟғᴇʀ The reason for my comment is that I could have a shorter code by doing a simple sum (range and sum all) than by using the Gauss formula.
The famous Gauss formula:
code-golfmathnumber
The famous Gauss series goes like this:
1 + 2 + 3 + 4 + 5 ... 96 + 97 + 98 + 99 + 100 = ???
Gauss figured out that, if you separate the numbers into two groups of 50 numbers each, you get:
(1 + 100) + (2 + 99) + (3 + 98) ... (48 + 53) + (49 + 52...
I'm pretty sure it doesn't cause any particular problems to discuss things either in sandbox comments or in chat. Mostly the conversation is disposable and doesn't need to be kept after the challenge is edited. Occasionally a challenge needs a long term persistent discussion and then a new chat room is created.
Replies are a great way to keep the chat intelligible when several conversations are happening at once, or even just to tie connected messages together when everyone is talking about the same thing. As long as the person you are pinging isn't complaining, I don't see a problem...
If you star this, you will have starred it. If you don't star this, you will have not starred it. Not starring it means that it has not been starred. Therefore, star it. When you star it, it will have been starred. . Not starring it means that it has not been starred. Therefore, star it. When you star it, it will have been starred.
It's all there, black and white, clear as crystal! You stole fizzy lifting drinks! You bumped into the ceiling which now has to be washed and sterilized
code-golf string geometry grid
A cube of text
Last time you made a square of text, but now, can you make a cube of text?
The Challenge
Given a string, output the string in the form of a cube.
(for strings that are 1 char long, output the string once.)
How to Make a Cube
Test Cases
Inp...
Wrong, sir! Wrong! Under section 37B of the contract signed by him, it states quite clearly that all offers shall become null and void
I, the undersigned, shall forfeit all rights, privileges, and licenses herein and herein contained, et cetera, et cetera... Fax mentis incendium gloria cultum, et cetera, et cetera... Memo bis punitor delicatum!
How do I make vi-Vim never use tabs (converting spaces to tabs, bad!), makes the tab key == 4 spaces, and automatically indent code after curly brace blocks like Emacs does?
Also, how do I save these settings so I never have to input them again?
I've seen other questions related to this, but it...