How to make a code to solve this problem?


  • 0
    C

    Input
    A number t ∈ R+ with two decimal digits, where t>0.

    Output
    Determine three numbers a,b,c ∈ R+
    a, b, c ∈ R+ with at most two decimal digits so that:

    1. a+b+c = t
    2. a×b×c=t
    3. 0<a≤b≤c
      So it should be printed like this a + b + c = a x b x c = t
      All numbers must be represented with two decimal digits

    e.g
    Input
    65.52

    Output
    0.52 + 2.00 + 63.00 = 0.52 x 2.00 x 63.00 = 65.52


Log in to reply
 

Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.