# Hack into a Lottery

You've recently made an account on a dodgy gambling site, where for a fee of 25 dollars, they will pay you back a random amount between 0 and 50 dollars. After getting around 5 dollars twice, you decide to prove the site is a scam. After accessing their external firewall with the default password, you find your way onto their database server, and find where the values for the minimum and maximum amounts are held. You decide to plug 25 '9's in as the maximum value, but get an error message saying the maximum value must be of type 'uint64'. However it is now that you notice some number keys don't seem to type into the remote console correctly. The challenge appears before you almost as if typed up on a Q+A site.

using only the conveniently installed programs for testing and executing your particular language, output the maximum size of an unsigned 64-bit integer value, however almost everything except the programming tools are broken on this machine, leaving you without the use of the numbers 1,2,4,6,8 - in either source code or literals, you also notice that it seems to take an exponentially longer amount of time to execute the program for each additional piece of code, so you'd better keep it short if you want to get rich before the drawing!

# The Challenge

• Write a program which outputs 18446744073709551615, the maximum value of an unsigned 64-bit integer, as either a number, or a single string.

• Your source code cannot contain any of the characters '1','2','4','6' or '8'

• if your language does not have an unsigned 64-bit integer or equivalent, the output can be in string format or otherwise, but must be the above number.

• this is so shortest code in each language wins!

• predefined values. pfft – Matthew Roh Feb 21 '17 at 12:29
• can output be a hexadecimal number? – user902383 Feb 21 '17 at 13:25
• @user902383 must be in the exact format, feel free to parse it as a hex number, as long as the output is in normal decimal notation. – colsw Feb 21 '17 at 14:16
• I love the story lol. More challenges need a backstory like this – Cruncher Feb 22 '17 at 14:40
• So now that there are many solutions to choose from, was the gambling site a fraud? – Tominator Feb 23 '17 at 10:32

#
(
*
*
*
Ā


Try it online!

I can't think of a cleverer way to fold this up that wouldn't kill the squaring. Note that Ā has codepoint 256. Two characters can be shaved off by using 65536 instead, but it comes out to precisely the same byte count:

#
(
*
*
𐀀


Try it online!

## Python, 19 bytes

In REPL

int('3'*(35-3),7-3)


Not in REPL

print int('3'*(35-3),7-3)


## Pyke, 5 bytes

Zw@t


Try it here!

 w   -   64
Z  @  -  set_bit(0, ^)
t - ^ -1


# Vim, 41 bytes:

:im a <C-o><C-v><C-a>
i0a7a3a3a5a73a3a073709550a5a0a5


This uses the <C-a> command (increment) to get around the restriction of not using 1, 2, 4, 6, or 8. No TIO link since this doesn't seem to work in V, but it definitely works on vim locally.

# MUMPS, 15 bytes

w 9+7**(9+7)-'0


# SmallTalk – 60 characters

Transcript show:(((7+9)raisedTo:(7+9))-(3/3))printString;cr.


# SmileBASIC, 35 bytes

?POW(!.+!.,#X)LOCATE #A,0?ASC("x")


x should be replaced with CHR$(1615) # Groovy, 28 Bytes {++(Long.MAX_VALUE​/0.5​)​}​  ## GO 62 bytes package main import ("fmt") func main(){fmt.Print(^uint64(0))}  (This is my first submit too) • Your source code contains '6' and '4' I'm afraid. – Wilfred Hughes Feb 25 '17 at 15:28 • I'm blind. Thanks for that. – Brad McCormack Mar 1 '17 at 3:06 # Ruby, 18 bytes p (9+7)**(9+7)-7/7  • Would (9+7)**(9+7) save you a byte? – Neil Feb 21 '17 at 22:49 ## AWK, 39 bytes {$0=(a+=++a)^(a*=a*=a*a);sub(".$",5)}1  Usage: awk '{$0=(a+=++a)^(a*=a*=a*a);sub(".\$",5)}5' <<< "anything one line here"


Annoyingly AWK has trouble with integer math beyond 2^53 since it internally converts large integers to 64-bit doubles. Since 2^64 can be exactly represented as a double, its string representation should be exactly 18446744073709551616 (it is on my machine, anyway). Unfortunately, 2^64 - 1 == 2^64, so I could not simply decrement the value, hence the workaround via string substitution.

# asm2bf, 9 bytes

Function body assuming r1 = 0, returns the desired value in r1.

decr1
ret


# Python, 20 (or 26) bytes

(5-3)**ord('@')-3**0


ord('@') is equal to 64.

The full function/programme (@BusinessCat, I hope this is more in line with what is expected) would add 6 bytes:

print (5-3)**ord('@')-3**0


The 26 byte version would work if we wanted to pipe the output:

python -c "print (5-3)**ord('@')-3**0"


The 20 byte version would not.

• This is a snippet, every submission needs to be a full program or function. – Business Cat Feb 27 '17 at 14:19
• you can do 3/3 instead of 3**0 and you can remove the space after print to save 2 bytes – Sagittarius May 20 at 9:35