The Ad Duel
Lantern ran two ad creatives against each other for a week. Creative A was shown far more often than B, purely because of how the budget landed, so the raw click totals are not a fair fight. The team has to name a winner before Monday, and a dead heat is an answer they are prepared to report.
Task: Print which creative earned clicks at the higher rate per showing.
Input
Two lines. Each holds two integers separated by a single space: how many times the creative was shown, then how many clicks it earned. The first line is creative A, the second is creative B. Neither was shown zero times.
Output
One line: A if A's rate is higher, B if B's is higher, or tie if the two rates are exactly equal. The rate decides it, never the raw click total.
Example:
Input:
1000 30
800 32
Output:
B
Sign in to solve this problem
Reading problems is free for everyone — solving them (Run, Submit, and tracking what you've solved) needs an account.
Sign in