yaworsw/euler-manager

View on GitHub
data/problems/217.yml

Summary

Maintainability
Test Coverage
---
:id: 217
:name: Balanced Numbers
:url: https://projecteuler.net/problem=217
:content: "A positive integer with <var>k</var> (decimal) digits is called balanced
  if its first ⌈<sup><var>k</var></sup>/<sub>2</sub>⌉ digits sum to the same value
  as its last ⌈<sup><var>k</var></sup>/<sub>2</sub>⌉ digits, where ⌈<var>x</var>⌉,
  pronounced ceiling of <var>x</var>, is the smallest integer ≥ <var>x</var>, thus
  ⌈π⌉ = 4 and ⌈5⌉ = 5.\n\nSo, for example, all palindromes are balanced, as is 13722.\n\nLet
  T(<var>n</var>) be the sum of all balanced numbers less than 10<sup><var>n</var></sup>.
  \  \nThus: T(1) = 45, T(2) = 540 and T(5) = 334795890.\n\nFind T(47) mod 3<sup>15</sup>\n\n"