Ad
  • Custom User Avatar
    calculatewinners("|-----------~~~----------p~~~~~~|\n
                      |-------------------p-----------|\n
                      |------p----------~-------------|\n
                      |---------------~------p--------|\n
                      |------------p-~~~~~~-----------|", 
                      ["Adam", "Brain", "Flipper", "Franko", "Darwin"]) 
                      --> "GOLD: Franko, SILVER: Brain, BRONZE: Adam"
    

    The test is ok:

    Waves (~) take twice as long to swim through as smooth water (-).

    It takes Adam 12 time units to reach the finish line, and for Brain only 11.