Magic number X58653


Statement
 

pdf   zip

html

Input

The input consists of three lines:

- First line has the total number of games in a regular season. - Second line has the name (in a single word) of the front-running team followed by the numbers of wins and losses during current season. - Third line has the name (in a single word) of the second place team followed by the numbers of wins and losses during current season.

Output

The output will be a single line reporting the magic number of matches that the front-running team must win to conquer the season title.

Public test cases
  • Input

    162
    Chicago 90 45
    Cleveland 88 46
    

    Output

    Chicago must win 27 matches
    
  • Information
    Author
    HP CodeWars
    Language
    English
    Official solutions
    Python
    User solutions
    C++ Haskell Java Python