Page 1 of 1

Looks can be Deceiving

Posted: Fri May 25, 2012 6:42 pm
by megabreit
Is there any trick or do we just have to find out what programming language is used?

Posted: Sat May 26, 2012 9:09 am
by AMindForeverVoyaging
Is this a new challenge? Could you tell us after which other challenge it opens up?

Posted: Sat May 26, 2012 9:33 am
by b0bA
This challenge isn't new. You will get it right after solving the challenge "It's a small World"

Posted: Sat May 26, 2012 11:32 am
by laz0r
Hmm, well I believe it most certainly isn't C but I'm struggling to work out what it could be.

Posted: Sat May 26, 2012 2:29 pm
by AMindForeverVoyaging
laz0r wrote:Hmm, well I believe it most certainly isn't C
That should be easy enough to check: Ask your local friendly C compiler. ;)

Posted: Sat May 26, 2012 8:01 pm
by laz0r
AMindForeverVoyaging wrote:
laz0r wrote:Hmm, well I believe it most certainly isn't C
That should be easy enough to check: Ask your local friendly C compiler. ;)
Unfortunately he hated it :( but my poor brain's struggling to identify it anyway!

Posted: Sat Jun 23, 2012 2:14 pm
by AMindForeverVoyaging
laz0r wrote:Hmm, well I believe it most certainly isn't C
Now that I have reached this challenge: Yes and no.

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.

Posted: Tue Mar 19, 2013 8:48 pm
by aurora
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 ;)

Posted: Wed Feb 26, 2014 4:55 pm
by TheBigBoss
Filling up the lines with spaces, you can run it as a SuperHack program. Unfortunately, the output is not the answer. :?

Posted: Thu Feb 27, 2014 12:54 am
by AMindForeverVoyaging
TheBigBoss wrote:Filling up the lines with spaces, you can run it as a SuperHack program. Unfortunately, the output is not the answer. :?
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?

Posted: Mon Sep 18, 2017 9:38 pm
by Napoleon
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?