Mini programming puzzle/challenge #2

Very close, but can’t use *, ~ or -

This is my solution. I actually learned a solid lot from trying to write hello world with the constraints that were set in this challenge, but I honestly would rather just prefer to write plain print('hello world')

Anyway, without further ado, here is my cryptic attempt at it

1 Like

Got a couple of * in there, technically you can’t use those, but you have essentially solved it :clap: :smile:


Fixed it and now it’s all on one line

1 Like

idk if it hasn’t updated for me or smthn but I still see some * and also [] list data type

Hmmm nice i could not do that.

I updated my solution. Now I think I crack it without braking any rules (i think) :sweat_smile: I use only + what is allowed in other solutions. I figured out way to generate 1 by using only inbuild functions without any custom arguments.

This is how i generate 1:

const one = Math.exp(document.getElementById(String.toString()));

This is probably wont break rules as Math.ceil(Math.random()) is also allowed in winning solution to generate one. :melting_face:

You should spoiler alert that.

1 Like
This is how I generate 1 in Python

one = int(bool(bool)) (almost anything that goes inside int(bool()) returns 1)

You should put that as a spoiler.


For any future people who decided to post a part of their solution, put it as a spoiler, as it says so by matt.