hackerrank.com

Practice>Python>Itertools>Maximize It!

건이두 2019. 3. 7. 07:20
728x90

hackerrank.com

Maximize It!

Problem link : https://www.hackerrank.com/challenges/maximize-it/problem
Difficultiy : Hard


Tip

  • Cartesian product is a key to solve this problem, from 'from itertools import product'
  • Don;t miss that the first item in each K line, is # of Ni
  • Do '%' to sum of each item
  • Save maximum result of '%'


Solution


728x90