← RoseCode

ROSECODE 119

In a distance

Philippe_57721 · Programming ·


Author Philippe_57721

We are reading the decimal part of PI by slices of 10 digits:
1415926535, 8979323846, 2643383279, 5028841971,...

In the first 20,000,000 digits, how many slices are the closest of 1415926535 (not included) in the sense of the Damerau-Levenshtein distance?

Answer format: Count,(Slice with the closest euclidian distance)

Example: 3,1145726635 // For the first 2000000 digits

[My timing: 35 sec]
PS:
As there are two slightly different algorithms for this distance, the problem is using the restricted edit distance version.