wip
Time Limit: 1 seconds
Memory Limit: 128 MB
Rating: 800
Problem StatementOne of the best parts of Pokemon is duelling - fighting Pokemon’s against each other! The rules of the duel is as follows: Every round one of the pokemon deals their damage to the other pokemon. After each round, the attacking pokemon changes to the other pokemon. The first pokemon will attack first. Given two pokemon and their name, health and damage work out which pokemon will win the duel. The rules of the duel is as follow: every round each pokemon deals their damage to the other pokemon. The first pokemon will attack first. Determine the name of the winner of the duel.
InputEach of the first two lines contain string $S$, the name of the Pokemon, and integers $H$ and $D$, the health and damage per round respectively. $(1 \le H, D \le 1000)$
OutputOutput the name of the Pokemon who wins the duel.
Sample CasesSample Input 1: Charmander 100 5 Squirtle 125 3 Sample Output 1: Charmander Sample Input 2: Pikachu 50 50 Snorlax 500 10 Sample Output 2: SnorlaxExplanation
Not available for this problem.
SourcesKL Coding Cup March 2023 > Pokemon > Problem 1
Submit | Back