103390: [Atcoder]ABC339 A - TLD

Memory Limit:256 MB Time Limit:2 S
Judge Style:Text Compare Creator:
Submit:15 Solved:0

Description

Score: $100$ points

Problem Statement

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

Constraints

  • $S$ is a string of length between $2$ and $100$, inclusive, consisting of lowercase English letters and ..
  • $S$ contains at least one ..
  • $S$ does not end with ..

Input

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

$S$

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

$S$ may contain multiple .s.


Sample Input 3

.z

Sample Output 3

z

$S$ may start with ..


Sample Input 4

..........txt

Sample Output 4

txt

$S$ may contain consecutive .s.

Output

分数:100分

问题描述

给定一个由小写英文字母和字符.组成的字符串$S$。

输出将$S$按.进行分割后,最后一个子字符串。

换句话说,输出$S$中不包含.的最长后缀。

约束条件

  • $S$是一个长度在$2$到$100$之间的字符串,由小写英文字母和.组成。
  • $S$至少包含一个.
  • $S$不以.结尾。

输入

输入数据通过标准输入给出,格式如下:

$S$

输出

输出答案。


样例输入1

atcoder.jp

样例输出1

jp

atcoder.jp中不包含.的最长后缀是jp


样例输入2

translate.google.com

样例输出2

com

$S$可能包含多个.


样例输入3

.z

样例输出3

z

$S$可能以.开头。


样例输入4

..........txt

样例输出4

txt

$S$可能包含连续的.

Sample Input Copy


Sample Output Copy


加入题单

上一题 下一题 算法标签: