Ostrich weight
Statement
Goal
A male ostrich weighs 20% more than a female one.Given the gender of an ostrich, and its weight, display the weight of its counterpart.
If the gender is unknown, you should display "UNKNOWN".
Input
A single letter : 'F' for Female, 'M' for Male, any other char should be treated as unknown.
An integer W representing the ostrich weight.
An integer W representing the ostrich weight.
Output
The weight of the opposite gender ostrich rounded down.
Constraints
0 <= W < 200
Example
Input
F 100
Output
120
Game modes
Fastest, Shortest
Test cases
Test 1 Test
Input
F
100
Output
120
Validator 1 Validator
Input
F
90
Output
108
Test 2 Test
Input
M
120
Output
100
Validator 2 Validator
Input
M
108
Output
90
Test 3 Test
Input
a
50
Output
UNKNOWN
Validator 3 Validator
Input
z
40
Output
UNKNOWN
Test 4 Test
Input
F
101
Output
121
Validator 4 Validator
Input
M
117
Output
97
Solution language
Solution
Stub generator input