yaworsw/euler-manager

View on GitHub
data/problems/126.yml

Summary

Maintainability
Test Coverage
---
:id: 126
:name: Cuboid layers
:url: https://projecteuler.net/problem=126
:content: "The minimum number of cubes to cover every visible face on a cuboid measuring
  3 x 2 x 1 is twenty-two.\n\n ![]({{ images_dir }}/p126.gif)
  \ \n\nIf we then add a second layer to this solid it would require forty-six cubes
  to cover every visible face, the third layer would require seventy-eight cubes,
  and the fourth layer would require one-hundred and eighteen cubes to cover every
  visible face.\n\nHowever, the first layer on a cuboid measuring 5 x 1 x 1
  also requires twenty-two cubes; similarly the first layer on cuboids measuring 5 x 3 x 1,
  7 x 2 x 1, and 11 x 1 x 1 all contain forty-six
  cubes.\n\nWe shall define C(_n_) to represent the number of cuboids that contain
  _n_ cubes in one of its layers. So C(22) = 2, C(46) = 4, C(78) = 5, and C(118) =
  8.\n\nIt turns out that 154 is the least value of _n_ for which C(_n_) = 10.\n\nFind
  the least value of _n_ for which C(_n_) = 1000.\n\n"