A remote resupply station receives automated cargo pods before they dock. Each pod has three positive integer dimensions -- length, width, and height, measured in centimeters -- and a positive integer mass in kilograms. Docking control triages every incoming pod into exactly one of four handling categories before it can be routed to a berth.
A pod is oversized if at least one of its three dimensions is at least 10,000 cm, or if its volume (length * width * height) is at least 1,000,000,000 cubic centimeters.
A pod is overweight if its mass is at least 100 kilograms.
Report the pod's handling category using exactly one of the following strings:
Oversized and Overweight -- the pod is both oversized and overweightOversized -- the pod is oversized onlyOverweight -- the pod is overweight onlyStandard -- neither condition holdsA single line containing four space-separated integers: length width height mass.
A single line containing exactly one of the four category strings described above.
Example 1
Input
4 3 4 5
Expected
Standard
Explanation
None of the three dimensions (4, 3, 4) reaches 10,000, and the volume 4*3*4 = 48 is far below 1,000,000,000, so the pod is not oversized. The mass 5 is below 100, so it is not overweight either. With neither condition true, the category is `Standard`.
Example 2
Input
200 50 800 1000
Expected
Overweight
Explanation
The dimensions 200, 50, and 800 are all below 10,000, and the volume 200*50*800 = 8,000,000 is below 1,000,000,000, so the pod is not oversized. The mass 1000 is at least 100, so the pod is overweight. Since only the overweight condition holds, the category is `Overweight`.
Ready to solve this?
Sign in to open the editor, run your code against the sample tests, and submit against the full test suite.
Sign in to solve →