All problems

Simulating Many Dice Rolls

mediumPythonNumPynp.random.randint

Marchmont Games is checking the digital die in a board-game app before release. A tester complains that sixes feel rare, so the studio runs the die 1000 times and counts the sixes, then compares that count against what a fair die should give. The die is fair by design: six faces numbered 1 to 6, each equally likely, every roll independent of the last. The run must be repeatable so the bug report can be reproduced, so NumPy's classic global random stream is set from a seed before the first roll.

Task: Print how many of the 1000 rolls came up six.

Input

One line holding a single integer, the seed.

Output

One line holding the count of sixes as a plain integer.

Example:

Input:
1

Output:
170

Sign in to solve this problem

Reading problems is free for everyone — solving them (Run, Submit, and tracking what you've solved) needs an account.

Sign in

Discussion

Sign in to join the discussion — reading is open to everyone.

Loading comments…