yaworsw/euler-manager

View on GitHub
data/problems/413.yml

Summary

Maintainability
Test Coverage
---
:id: 413
:name: One-child Numbers
:url: https://projecteuler.net/problem=413
:content: "We say that a <var>d</var>-digit positive number (no leading zeros) is
  a one-child number if exactly one of its sub-strings is divisible by <var>d</var>.\n\nFor
  example, 5671 is a 4-digit one-child number. Among all its sub-strings 5, 6, 7,
  1, 56, 67, 71, 567, 671 and 5671, only 56 is divisible by 4.  \nSimilarly, 104 is
  a 3-digit one-child number because only 0 is divisible by 3.  \n1132451 is a 7-digit
  one-child number because only 245 is divisible by 7.\n\nLet F(<var>N</var>) be the
  number of the one-child numbers less than <var>N</var>.  \nWe can verify that F(10)
  = 9, F(10<sup>3</sup>) = 389 and F(10<sup>7</sup>) = 277674.\n\nFind F(10<sup>19</sup>).\n\n"