• Custom User Avatar

    EN

    On each iteration you call the method lower(). This happens 26 times.

    It's better to do this once before the loop and save it in a variable, and then access it.

    RU

    На каждой итерации вы вызываете метод lower(). Это происходит 26 раз.

    Лучше сделать это один раз перед циклом и сохранить в переменной, а затем обращаться к ней.

  • Custom User Avatar

    That is not a best practise at all!

  • Custom User Avatar

    In Python, you may use decimal module.

  • Custom User Avatar

    I am sorry but could someone tell me how to calculate square roots of large numbers such as "1488099328131240642930278400000000" very precisely (round up to lower int) so that if I make x^2 I get "1488099328131240642930278400000000"±10 (approximately) as an output?

  • Custom User Avatar

    I am surprise because I tought everyone used the way I used but seen none.
    Was the way I did the way it was intented ?

  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Custom User Avatar

    My bad I re-read the description and saw that it was pairs between 1 and n and not sum(range(1,n)).
    Thank you anyway !

  • Custom User Avatar

    I don't understand what you mean. You have to return all pairs that work and only these pairs. Moreover it seems you understood since you passed.

  • Custom User Avatar

    My code works fine except I just don't understand why sometimes you need to return only one pair of integers when several others would work and sometimes you need to return more but not every single one of them.
    Could someone explain me this please?

  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Custom User Avatar

    Why is it not an issue ? The result is not the good one since D is not as small as possible.

  • Custom User Avatar

    Not an issue with the kata.

  • Custom User Avatar

    Why [[69, 130], [87, 1310], [3, 4]] should return [[18078, 34060], [2262, 34060], [25545, 34060]] and not [[3588, 6812], [435, 6812], [5109, 6812]] since Fraction(69,130)+Fraction(87,1310)+Fraction(3,4) --> Fraction(9177, 6812)?

    Can someone give me a hint on this one ?

  • Custom User Avatar

    It's not a duplicate

    How do you know? Here is an exactly same kata, and there're definitely more approved ones.

  • Custom User Avatar

    I will unpublish it until its 100% working

  • Loading more items...