Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Flag:b64_bz_unwrap
- Challenge 1:
- Let f(n) be the number of 1s in the binary representation of n^13 + 12 where ^ denote exponent
- Let g(n,1) = f(n),
- g(n,2) = f(f(n)),
- g(n,3) = f(f(f(n))), etc.
- Find g(3,2^48).
- Provide the solution and your code used to find it.
- Challenge 2:
- There is a long line of bowls with a machine next to each. When bowl[i] has more than 14 M&Ms, the machines take 3 seconds to divide them as follows:
- 1. N = bowl[i]
- 2. Simultaneously
- A. bowl[i-1] += N/2 (round down)
- B. bowl[i+1] += N/2 (round down)
- C. bowl[i] = N mod 2
- 3. Rest
- All bowls start empty. One bowl labeled "B", gets a new M&M every hour. A bowl may receive M&Ms from up to three machines at a time.
- How many days will pass before the machines take a full hour to settle from the chain reaction caused by adding an M&M to B?
- Provide the solution and your code used to find it.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement