Skip to content

Instantly share code, notes, and snippets.

@eoftedal
Last active August 29, 2015 14:19
Show Gist options
  • Save eoftedal/32cef64693db3c7f02f2 to your computer and use it in GitHub Desktop.
Save eoftedal/32cef64693db3c7f02f2 to your computer and use it in GitHub Desktop.
import java.security.SecureRandom;
import java.math.BigInteger;
public class Lottery {
private static SecureRandom random = new SecureRandom();
public static void main(String[] args) {
/*
****************************************************************************************************************************************
$$\ $$\ $$\
$$ | $$ | $$ |
$$ | $$$$$$\ $$$$$$\ $$$$$$\ $$$$$$\ $$$$$$\ $$\ $$\
$$ | $$ __$$\\_$$ _|\_$$ _| $$ __$$\ $$ __$$\ $$ | $$ |
$$ | $$ / $$ | $$ | $$ | $$$$$$$$ |$$ | \__|$$ | $$ |
$$ | $$ | $$ | $$ |$$\ $$ |$$\ $$ ____|$$ | $$ | $$ |
$$$$$$$$\\$$$$$$ | \$$$$ |\$$$$ |\$$$$$$$\ $$ | \$$$$$$$ |
\________|\______/ \____/ \____/ \_______|\__| \____$$ |
$$\ $$ |
\$$$$$$ |
\______/
**************************************************************************************************************************************** \u002a\u002f\u006a\u0061\u0076\u0061\u002e\u0075\u0074\u0069\u006c\u002e\u0052\u0061\u006e\u0064\u006f\u006d\u0020\u0072\u0061\u006e\u0064\u006f\u006d\u0020\u003d\u0020\u006e\u0065\u0077\u0020\u006a\u0061\u0076\u0061\u002e\u0075\u0074\u0069\u006c\u002e\u0052\u0061\u006e\u0064\u006f\u006d\u0028\u0031\u0029\u003b\u002f\u002a
Lottery Number generator 2000!
*/
String lotteryNumber = new BigInteger(130, random).toString(32);
System.out.println("The winning number is: " + lotteryNumber);
}
}
@lillesand
Copy link

Clever!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment