• + 0 comments

    Not simple

    def solve(a, b, c):
    
        if a + b <= c:
            return("1/1")
        else:
            big_triangle = c ** 2
            
            if c > a:
                big_triangle -= (c-a) * (c-a)
            if c > b:
                big_triangle -= (c-b) * (c-b)
                
            result = F.Fraction(big_triangle, 2 * a * b)
    
            return str(result)