Ad
  • Custom User Avatar

    check the given input variables in getSerie
    One is an optional agrument

  • Default User Avatar

    I get undefined as a start value in function getSerie.

  • Default User Avatar

    I get undefiend as a start value every test in JS

  • Custom User Avatar

    PureScript Translation Kumited - please accept :D

  • Custom User Avatar

    I didn't say that, read the instructions (until you get them) and the sample tests. Do you know what common denominator is?

    (207,390)(261,3930)(9,12) // all denominators are different here

    You don't need to reduce the fractions after you got the common denominator, the denominator as I already said before, has to be the same for all fractions.

    You have to produce a result in the form

    (N_1, D) ... (N_n, D)

  • Default User Avatar

    So you want to say that 2 is same denominator as 12? Seriously?

  • Custom User Avatar

    The output fractions should have the same denominator, as seen in the instructions.

    convertFracs [(1, 2), (1, 3), (1, 4)] shouldBe [(6, 12), (4, 12), (3, 12)]

  • Default User Avatar

    in which D is as small as possible and

    N_1/D == numer_1/denom_1

    My code generate (3,6) for pare (1,2) and here D is the smallest, but test code generate (6,12). And such situation in each test.
    One more example.
    Expected: '(18078,34060)(2262,34060)(25545,34060)', instead got: '(207,390)(261,3930)(9,12)'
    But my D is smaller than test D and my answer still correct because
    18078/34060 = 207/390
    2262/34060 = 261/3930
    25545/34060 = 9/12