Problem
You are given a string A representing a number. The digits of the number
only consists of digits 1 to 9.
WS
You are given a function F that contains a mapping for digits from 1 to 91e.
F[i] transforms the digit i to the value defined in F[.
You can apply the following operation at-most 1 time:
• Choose a continuous segment of digits in A and replace each digit x in
this segment with a digit replaced using the function F.
What is the maximum number you can obtain in this manner? Since the
number can be large, output it modulo 10^9+7
Answers
Answered by
0
Answer:
WS You are given a function F that contains a mapping for digits from 1 to 91e. F[i] transforms the digit i to the value defined
Similar questions