Computer Science
# Strings

Substitution: Replacing a single character from \(a\) so that it matches \(b\) costs \(1\). If \(a=\text{rot}\) and \(b=\text{dot}\). Then \(f(a,b)=1\).

Insertion: Inserting a single character also costs \(1\). Ie, If \(a = \text{girl}\) and \(b=\text{girls}\), then \(f(a,b)=1\).

Deletion: Deleting a single character also costs \(1\). Ie. If \(a=\text{hour}\) and \(b=\text{our}\) then \(f(a,b)=1\).

Given \(a\) and \(b\), compute \(f(a,b)\).

Let the **reverse** of a positive integer \(n\), denoted \(R(n),\) be the result when the digits of the number are written backwards; for example, \(R(190) = 091,\) or just \(91.\)

Call a positive integer \(n\) **brilliant** if \[n + R(n)\]

is a multiple of 13. Let \(B\) be the \(10000\)th brilliant number. Compute the last three digits of \(B.\)

**PalPrime** is a prime number that is also a palindrome.The first few PalPrimes are \(2, 3, 5, 7, 11, 101, 131, 151, 181, 191...\). Let \(S\) be the sum of the digits of the largest PalPrime \(N\) such that \(N<10^9\).What is the value of \(S\)?

×

Problem Loading...

Note Loading...

Set Loading...