The TransCompilator

Solved LeetCode program · 338 of 1,000

#0458 · Poor Pigs

Hard Math chunk-07.md

Original English source

The buckets is 1000. The die is 15. The window is 60. The rounds is window divided by die. The base is rounds plus 1. The pigs is 0. The covered is 1.
Repeat while covered is less than buckets.
Set covered to covered times base. Add 1 to pigs.

Show pigs.

Open in Playground Browse all 1,000 problems

Expected stdout

5