# 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

# 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.

# Java, 92 Bytes :-D

class a{public static void main(String[] a){System.out.print(Long.toUnsignedString(-3/3));}}


# 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