Ad
  • Custom User Avatar

    Please clarify this point:

    Assume all penguins swim at the same speed.

    to this:

    Assume all penguins swim at the same speed, when swimming through the same kind of water (waves or smooth water).

  • Default User Avatar

    My bad.
    I miss-intepreted the instruction "Assume all penguins swim at the same speed." as saying that their speed is constant.

  • 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.

  • Default User Avatar

    Hi correct me if I'm wrong but for

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

    It marks my answer as wrong and gives the following output

    	Expected: "GOLD: Franko, SILVER: Brain, BRONZE: Adam"
    	Occurred: "GOLD: Franko, SILVER: Adam, BRONZE: Brain"
    

    When clearly Adam would finish faster than Brain