yaworsw/euler-manager

View on GitHub
data/problems/358.yml

Summary

Maintainability
Test Coverage
---
:id: 358
:name: Cyclic numbers
:url: https://projecteuler.net/problem=358
:content: "A **cyclic number** with <var>n</var> digits has a very interesting property:
  \ \nWhen it is multiplied by 1, 2, 3, 4, ... <var>n</var>, all the products have
  exactly the same digits, in the same order, but rotated in a circular fashion!\n\nThe
  smallest cyclic number is the 6-digit number 142857 :  \n142857 × 1 = 142857  \n142857
  × 2 = 285714  \n142857 × 3 = 428571  \n142857 × 4 = 571428  \n142857 × 5 = 714285
  \ \n142857 × 6 = 857142\n\nThe next cyclic number is 0588235294117647 with 16 digits
  :  \n0588235294117647 × 1 = 0588235294117647  \n0588235294117647 × 2 = 1176470588235294
  \ \n0588235294117647 × 3 = 1764705882352941  \n...  \n0588235294117647 × 16 = 9411764705882352\n\nNote
  that for cyclic numbers, leading zeros are important.\n\nThere is only one cyclic
  number for which, the eleven leftmost digits are 00000000137 and the five rightmost
  digits are 56789 (i.e., it has the form 00000000137...56789 with an unknown number
  of digits in the middle). Find the sum of all its digits.\n\n"