Project Euler 323 - Bitwise-OR operations on random integers

Official link:

Thought Process

I've done a similar problem in my Statistics and Probability course, simple if you know the approach!

Interactive Code

Input an integer (yourinput)

Code will output the expected value of N where yi is a random yourinput bit integer