Tony wants to print out the full lyrics to the song "99 Bottles of Beer on the Wall," so he's written the code below. The song is supposed to involve taking down each of the 99 bottles in turn and passing them around until all the bottles have been taken down and passed around.
1 2 3 4 5 6 7 8 9 |
|
What is wrong with his lyrics?
Your friend has written a program to check whether or not a number is prime. It is very simple and works by checking if is divisible by each number from 2 all the way to . When you see this, you curse your friend and tell him he's wasting time.
If your friend didn't want to waste time, what is (approximately) the biggest number that he needs to check before he can determine that any number is prime?
Sandip, Tracy, Jamal, and Sheng are best friends who work together everyday at a banana stand. Since they are so close, their happiness on any given day depends on the happiness of the other three people on the previous day. Suppose they behave as follows:
Suppose that on day 1, all four of the friends are sad. After a few days, the friends reach a stable emotional state that repeats itself. What is the emotional state of each person in this repeating state?
Alice wants to send Bob a large file.
She is also worried about the security of the network. So, she needs to encrypt it.
Should she compress the data and then encrypt? Or should she encrypt the data and then compress? Or does it not matter?
Find the first 10-digit prime number that is found in consecutive digits of .
Background: The tech giant Google is known to have setup such billboards in the heart of Silicon Valley, and later in Cambridge, Massachusetts; Seattle, Washington; and Austin, Texas. It read
"{first 10-digit prime found in consecutive digits of e}.com".
Solving this problem and visiting the website led to an even more difficult problem to solve, which in turn led to Google Labs where the visitor was invited to submit a resume. Unfortunately, that website has been taken down.