#abc339a. A - TLD

A - TLD

Score: 100100 points

问题描述

给定一个由小写英文字母和字符 . 组成的字符串 SS
请输出当 SS. 进行分割时,最后一个子串。
换句话说,输出 SS 中不包含 . 的最长后缀。

以上为通义千问 qwen-max 翻译,仅供参考。

Problem Statement

You are given a string SS consisting of lowercase English letters and the character ..
Print the last substring when SS is split by .s.
In other words, print the longest suffix of SS that does not contain ..

Constraints

  • SS is a string of length between 22 and 100100, inclusive, consisting of lowercase English letters and ..
  • SS contains at least one ..
  • SS does not end with ..

Input

The input is given from Standard Input in the following format:

SS

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

SS may contain multiple .s.

Sample Input 3

.z

Sample Output 3

z

SS may start with ..

Sample Input 4

..........txt

Sample Output 4

txt

SS may contain consecutive .s.

update @ 2024/3/10 01:30:39