Problem I. Integer Prefix

时间限制 1000 ms   内存限制 256 MB

The Unique Numerical Association of Language (UNAL) is an association created to conserve only numbers in different texts. In fact, numbers are so important for UNAL, that its lemma is: 'people can communicate only using digits'.

Mr. Potato Head, the head of the UNAL has assigned you a task to help them to achieve the goal of the association.

Given a text $$$T$$$ you have to find the longest non-empty prefix of $$$T$$$ consisting only of digits, for the UNAL this is enough to understand the whole text.

输入数据

Input consists of a single line with a text $$$T$$$ without spaces.

The length of the text is between $$$1$$$ and $$$2 * 10^5$$$

输出数据

Print one line with the longest non-empty numeric prefix of $$$T$$$, if there is no such prefix print $$$-1$$$ instead.

样例

提交

请先 登录

© 2025 FAQs Contact About