cswork / OA打开练习工作台

PayPayOA #3

Find Maximum Two-Digit Fragment

估计简单可在线判题

考点(AI 标注)字符串

Among all contiguous fragments of length 2 in a digit string, find the maximum value when each fragment is interpreted as a decimal number.

输入格式

One line containing a digit string S of length 2..100000, consisting only of the characters 0..9.

输出格式

Output the value of the largest two-digit fragment; a leading zero is parsed as an integer.

样例 1

输入:

50552

输出:

55

样例说明

Derive a linear scan/dynamic programming solution directly from the problem rules; the examples have been checked one by one against an independently built oracle.