Skip to main content
replaced http://codegolf.stackexchange.com/ with https://codegolf.stackexchange.com/
Source Link
added 90 characters in body
Source Link
Dennis
  • 211.7k
  • 41
  • 380
  • 830
  • <Long> <mS|me|mt>{1,3}
  • <Long> <mS|me|mt>{x} <Long> <mS|me|mt>{y} ma <mS|me|mt>{z}.
  • Any of the above, with some cast to Long (i) or rounding (mo) applied to a Double.

In the lattersecond case, x + y + z is either 1 or 2 and one of the Longs is 0 or 17.

  • <Long> <mS|me|mt>{1,3}
  • <Long> <mS|me|mt>{x} <Long> <mS|me|mt>{y} ma <mS|me|mt>{z}.

In the latter case, x + y + z is either 1 or 2 and one of the Longs is 0 or 17.

  • <Long> <mS|me|mt>{1,3}
  • <Long> <mS|me|mt>{x} <Long> <mS|me|mt>{y} ma <mS|me|mt>{z}.
  • Any of the above, with some cast to Long (i) or rounding (mo) applied to a Double.

In the second case, x + y + z is either 1 or 2 and one of the Longs is 0 or 17.

added 1605 characters in body
Source Link
Dennis
  • 211.7k
  • 41
  • 380
  • 830
Hi "Stoprtme"petStorm!", mame 

How it works

 Hi " int(17) ";   "Stoprtme"petStorm!", " len('Stoprtme'petStorm!') ";   ma " atan2( , ) ";   me " exp( ) ";   " exp(atan2(int(17), len('Stoprtme'petStorm!'))) "; 

Cracking the code

The desired output, 2.956177636986737, is either a Double or a Double followed by a Long.

Using only the characters in "Stop, Hammer time!", there are four builtin operators that return non-integer Doubles:

  • mS, which is asin
  • ma, which is atan2
  • me, which is exp
  • mt, which is tan

All of them contain an m, so we can use at most three of them. There is only one S and one a.

All of those operators need input, and ma is the only one that consumes two inputs. We have only three ways to push Longs:

  • "...",, which pushes the string's length (strictly less than 18).
  • H, which pushes 17.
  • ...!, which pushes the logical NOT of ....

We have no way of pushing something falsy as ..., so the last option will always push 0.

The output doesn't begin or end with 17 or 0. Since 15 decimal digits is the usual number of digits for a Double, it seemed likely that the output was a simple Double.

Assuming this, the code has to fall in one of the following categories:

  • <Long> <mS|me|mt>{1,3}
  • <Long> <mS|me|mt>{x} <Long> <mS|me|mt>{y} ma <mS|me|mt>{z}.

In the latter case, x + y + z is either 1 or 2 and one of the Longs is 0 or 17.

The rest was basically brute force. After a few tries,

18 , {H \ ma me 2.956177636986737 =} = 

returned 9, meaning that

H 9 ma me 

produces the desired output.

All that's left is to eliminate all but 9 characters from the string. Spaces are noops and i is a noop on Longs, so "petStorm!" is one of the possible choices.

Hi "Stoprtme!", mame 
 Hi " int(17) ";   "Stoprtme!", " len('Stoprtme!') ";   ma " atan2( , ) ";   me " exp( ) ";   " exp(atan2(int(17), len('Stoprtme!'))) "; 
Hi "petStorm!", mame 

How it works

Hi " int(17) "; "petStorm!", " len('petStorm!') "; ma " atan2( , ) "; me " exp( ) "; " exp(atan2(int(17), len('petStorm!'))) "; 

Cracking the code

The desired output, 2.956177636986737, is either a Double or a Double followed by a Long.

Using only the characters in "Stop, Hammer time!", there are four builtin operators that return non-integer Doubles:

  • mS, which is asin
  • ma, which is atan2
  • me, which is exp
  • mt, which is tan

All of them contain an m, so we can use at most three of them. There is only one S and one a.

All of those operators need input, and ma is the only one that consumes two inputs. We have only three ways to push Longs:

  • "...",, which pushes the string's length (strictly less than 18).
  • H, which pushes 17.
  • ...!, which pushes the logical NOT of ....

We have no way of pushing something falsy as ..., so the last option will always push 0.

The output doesn't begin or end with 17 or 0. Since 15 decimal digits is the usual number of digits for a Double, it seemed likely that the output was a simple Double.

Assuming this, the code has to fall in one of the following categories:

  • <Long> <mS|me|mt>{1,3}
  • <Long> <mS|me|mt>{x} <Long> <mS|me|mt>{y} ma <mS|me|mt>{z}.

In the latter case, x + y + z is either 1 or 2 and one of the Longs is 0 or 17.

The rest was basically brute force. After a few tries,

18 , {H \ ma me 2.956177636986737 =} = 

returned 9, meaning that

H 9 ma me 

produces the desired output.

All that's left is to eliminate all but 9 characters from the string. Spaces are noops and i is a noop on Longs, so "petStorm!" is one of the possible choices.

added 86 characters in body
Source Link
Dennis
  • 211.7k
  • 41
  • 380
  • 830
Loading
added 236 characters in body
Source Link
Dennis
  • 211.7k
  • 41
  • 380
  • 830
Loading
Source Link
Dennis
  • 211.7k
  • 41
  • 380
  • 830
Loading