Fischer Clock X79176


Statement
 

pdf   zip

html

Input

The input consists of several lines. The first line describes the time control of the game in seconds: the total time per player + delay time. The next lines contain a pair of values specifying the movement time of player 1 and player 2 in seconds with millisecond resolution. Note that the first of this sequence will be the pair 0.0 0.0 as the starting time (delay is not applied). The input ends with the character #.

Output

The remaining time for each player, within 3 decimal precision.

Public test cases
  • Input

    900+5
    0.0 0.0
    7.359 3.237
    3.914 2.005
    6.077 2.229
    4.204 3.128
    7.525 5.014
    #

    Output

    895.921 909.387
    
  • Information
    Author
    HP CodeWars
    Language
    English
    Official solutions
    Python
    User solutions
    C++ Python