#abc339a. A - TLD
A - TLD
Score: points
问题描述
给定一个由小写英文字母和字符 . 组成的字符串 。
请输出当 以 . 进行分割时,最后一个子串。
换句话说,输出 中不包含 . 的最长后缀。
以上为通义千问 qwen-max 翻译,仅供参考。
Problem Statement
You are given a string consisting of lowercase English letters and the character ..
Print the last substring when is split by .s.
In other words, print the longest suffix of that does not contain ..
Constraints
- is a string of length between and , inclusive, consisting of lowercase English letters and
.. - contains at least one
.. - does not end with
..
Input
The input is given from Standard Input in the following format:
Output
Print the answer.
Sample Input 1
atcoder.jp
Sample Output 1
jp
The longest suffix of atcoder.jp that does not contain . is jp.
Sample Input 2
translate.google.com
Sample Output 2
com
may contain multiple .s.
Sample Input 3
.z
Sample Output 3
z
may start with ..
Sample Input 4
..........txt
Sample Output 4
txt
may contain consecutive .s.
update @ 2024/3/10 01:30:39