Advertisement
Guest User

Untitled

a guest
Oct 17th, 2019
111
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.89 KB | None | 0 0
  1. Flag:b64_bz_unwrap
  2.  
  3. Challenge 1:
  4. Let f(n) be the number of 1s in the binary representation of n^13 + 12 where ^ denote exponent
  5.  
  6. Let g(n,1) = f(n),
  7. g(n,2) = f(f(n)),
  8. g(n,3) = f(f(f(n))), etc.
  9.  
  10. Find g(3,2^48).
  11.  
  12. Provide the solution and your code used to find it.
  13.  
  14.  
  15. Challenge 2:
  16. 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:
  17. 1. N = bowl[i]
  18. 2. Simultaneously
  19. A. bowl[i-1] += N/2 (round down)
  20. B. bowl[i+1] += N/2 (round down)
  21. C. bowl[i] = N mod 2
  22. 3. Rest
  23.  
  24. 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.
  25.  
  26. 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?
  27.  
  28. Provide the solution and your code used to find it.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement