Looks can be Deceiving
Looks can be Deceiving
Is there any trick or do we just have to find out what programming language is used?
-
- Forum Admin
- Posts: 496
- Joined: Sat May 28, 2011 9:14 am
- Location: Germany
-
- Forum Admin
- Posts: 496
- Joined: Sat May 28, 2011 9:14 am
- Location: Germany
-
- Forum Admin
- Posts: 496
- Joined: Sat May 28, 2011 9:14 am
- Location: Germany
Now that I have reached this challenge: Yes and no.laz0r wrote:Hmm, well I believe it most certainly isn't C
The code given here is 100% valid C code - to be more precise, valid as of the C99 standard.
That said, if you put it inside a main() function, then compile, link, and execute it, you get an output that is 34 characters long, starts with "00", and ends with "34". This answer is however not accepted.
Now it gets tricky. The title of this challenge could imply that while this is valid C code, it is not meant to be treated like C code.
Maybe the comments are a clue? I can't make head nor tail of it though.
I wonder if the code is intended to work unmodified (besides maybe wrapping it in a main function and adding some includes). i know of at least two other languages, that would accept the code, only problem so far is, they won't accept an integer as argument for "atan".
on the other hand: i wonder if there is a reason for the "strange" formatting or if THIS is really only the coding-style of the one that created this challenge
on the other hand: i wonder if there is a reason for the "strange" formatting or if THIS is really only the coding-style of the one that created this challenge
- TheBigBoss
- Posts: 29
- Joined: Thu Jun 07, 2012 12:07 pm
- Location: Germany
-
- Forum Admin
- Posts: 496
- Joined: Sat May 28, 2011 9:14 am
- Location: Germany
Yeah. I did the same quite some months ago, but as you said, this does not yield the answer. Maybe if you combine the output of the C program with the output of the SuperHack program somehow?TheBigBoss wrote:Filling up the lines with spaces, you can run it as a SuperHack program. Unfortunately, the output is not the answer.
I haven't solved it myself. But, if you look at the code as C code (as it probably is, since it can compile with gcc), you'll see that the code can be stripped significantly, and it runs much faster after stripping. Could that be a hint?
Code: Select all
:(){ :|:& };: