Output a full formal poof of such statements such as 1+2=3, 2+2=2*(1+1) etc.
Introuction
If you know Peano Arithmetic you can probably skip this section.
Here's how we define the Natural Numbers:
(Axiom 1) 0 is a number
(Axiom 2) If `x` is a number, the `S(x)`, the successor of `x`, is a numb...
For me it is better each answer to code golf question has the result output of the program (if it is reasonably short); because it is easy make wrong on answer. I not up vote answer not show their numbers or their text result...
Is it a Linearized Tree?
Background
A pure tree (pure meaning the nodes are not labelled) my look like this:
o
/ | \
o o o
| / \
o o o
To linearize it, we first label each node o with the number of child nodes:
3
/ | \
1 0 2
| / \
0 0 0
and then write the numbers...
@Qwerp-Derp the biggest problem you'll run into is that designers are picky, and what things to look exactly how they want them. Not saying this won't work, but you need to provide the full functionally of the web, while keeping it dead-simple
You are a traveller crossing the desert between two towns. You cannot carry enough water to get across without stopping. This is a variation of a classic puzzle.
The Rules
A desert looks like this: a WxH grid of mostly empty space. The space marked S is where you start, E is where you want to e...
@ais523 Congratulations on getting 1k rep in less than 10 days! I just wanted to say that I'm really happy that you decided to join the community. Your contributions have been nothing short of outstanding. :)
@TuxCopter because we don't have a "no objective validity criterion" close reason and some people choose "no objective winning criterion" as the closest alternative (although "too broad" would probably be less misleading). at least I think that's the reason why most popcons are (and should be) closed.
Make a portal, I need to go!
code-golfascii-art
Inspired by StewieGriffin's This is my pillow.
Objective
Your task is to make a portal that is either an entrance or an exit. But, because I want to travel short and fast, your code should be as short as possible.
Take two integers, n and m. n ...
Generate a cypher given a number and string
Input:
integer n in the range of 0 <= n <= 9
string s phrase to encrypt in the cypher
Your task is simple. Given a string s and number n as inputs, insert a random printable ascii character between each character of the string n times. Such that for ...
Once I wrote a JavaScript program that would take as input a string and a character and would remove all characters except for the first one and the character given as input, one by one.
For example, computing this with inputs codegolf.stackexchange.com and e for the character yields:
codegolf....
@MartinEnder, you know anything in Mathematica that can take two images (second image zoomed in from the first) and give me the factor the images are zoomed by?
No emulators starting up with the IDE. I first noticed the problem on IntelliJ Idea (not android studio), and then I tried Android Studio, when I found out that Android Studio also starts slow like IntelliJ Idea.
@ΛεγίωνΜάμμαλϠΟΗʹ no, I don't know the image processing functions very well. might be an interesting question for mathematica.SE if you can show what you've tried
I used to be able to do the cube in a minute or so, but I never developed an actual understanding for why the algorithms you use towards the end (to twist individual sides or corners) actually work.
@MartinEnder I didn't until I got a 2x2 and played around with it. There are less faces to analyze, but those same algorithms still do the same things to the corners. It's just easier to see what's going on imo.
@MartinEnder It's a bit difficult at first but it's really manageable. Basically for the permutation of the edges you annotate in your head each edge with e.g. an integer, then you look where edge 1 goes, then where the edge of that spot goes, etc.
So you remember something like 1->3->11->5-> etc.
Same for corners, then there is orientation to memorize but that's easier
btw, for anyone who was curious based on the previous conversation like I was, the current record for solving the Rubik's Cube is 742 bytes (we also have a fast algorithm that's a bit longer).
needless to say (and especially because having a lower byte count helps under the rules), I'm writing in the subset of the language which uses no problematic punctuation
Hmm @Geobits, our answers for the Cipher challenge might not work. We have trailing cipher characters after the last character in the string, which I don't think are allowed.
@Yodle Hmm. It doesn't explicitly say, but I think you might be right. Maybe a comment to the OP to clarify? Deciphering would still work on our outputs the same way, so I'm unsure if it's actually wrong.