Ernest_21's blog

By Ernest_21, history, 6 years ago, In English

I have a list of number and I need to select 3 of them to make the product have the max number of trailing zeroes. help!!!

  • Vote: I like it
  • +4
  • Vote: I do not like it

| Write comment?
»
6 years ago, # |
  Vote: I like it +13 Vote: I do not like it

maximize the number of pairs of factors 2 and 5

  • »
    »
    6 years ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    dont undersatnd

    • »
      »
      »
      6 years ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      maximize min(factors of 2, factors of 5)

    • »
      »
      »
      6 years ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      number of trailing zeroes = min(factors of 5, factors of 2)

      • »
        »
        »
        »
        6 years ago, # ^ |
          Vote: I like it 0 Vote: I do not like it

        yes i know.the problems is to select the 3 number of the list optimaly

        • »
          »
          »
          »
          »
          6 years ago, # ^ |
            Vote: I like it +1 Vote: I do not like it
          factors of 5 = f5
          factors of 2 = f2
          
          f5(a * b) = f5(a) + f5(b)   
          f2(a * b) = f2(a) + f2(b)
          

          f5(a * b * c) = f5(a) + f5(b) + f5(c) f2(a * b * c) = f2(a) + f2(b) + f2(c)

          you need to maximize min(f5(a * b * c), f2(a * b * c))