Pizza Deal
InterviewTime limit1sMemory limit512 MB
Compare a slice's area per price with a whole pizza's pi*R1^2 per price and print the better deal.
- Level
Easy2 of 10
- Topics
- Math, Geometry, Implementation
- Solved
- No attempts yet
Problem
A pizza store serves pizza in two sizes: a pizza slice with area A1 and price P1, or a circular pizza with radius R1 and price P2.
You want to maximize the amount of pizza you get per dollar. Should you pick the pizza slice or the whole pizza?
Input
The first line contains two space-separated integers A1 and P1.
The second line contains two space-separated integers R1 and P2.
All values are guaranteed to be positive integers at most 10^3. It is also guaranteed that the two options are not worth the same amount of pizza per dollar.
Output
If the better deal is the whole pizza, print ‘Whole pizza’ on a single line.
If it is a slice of pizza, print ‘Slice of pizza’ on a single line.