Skip to content / Đến nội dung
ThichHocToan.com

MathNet 2017-part-07 — 172 problems (EN–VI) Question 129

Math Olympiad Vault · MathNet 2017-part-07 — 172 problems (EN–VI)

Question 129

A string of digits is defined to be similar to another string of digits if it can be obtained by reversing some contiguous substring of the original string. For example, the strings $101$ and $110$ are similar, but the strings $3443$ and $4334$ are not. (Note that a string is always similar to itself.) Consider the string of digits
$$
S=01234567890123456789012345678901234567890123456789
$$
consisting of the digits from $0$ to $9$ repeated five times. How many distinct strings are similar to $S$?