QOJ.ac

QOJ

시간 제한: 1.0 s 메모리 제한: 32 MB 총점: 30

#17036. AUTORI

통계

伟大的科学发现往往以做出这些发现的科学家的姓氏来命名。例如,最著名的非对称加密系统 RSA 是由 Rivest、Shamir 和 Adleman 发现的。另一个著名的例子是 Knuth-Morris-Pratt 算法,由 Knuth、Morris 和 Pratt 命名。

学术论文经常引用先前的研究,在同一篇文档中混合使用两种不同的命名约定并不罕见:一种是短缩写(例如 KMP),仅使用作者姓氏的首字母;另一种是长变体(例如 Knuth-Morris-Pratt),使用由连字符连接的完整姓氏。

我们认为在同一篇论文中混合使用这两种约定在美学上是不雅观的,希望你编写一个程序,将长变体转换为短缩写。

输入格式

输入的第一行也是唯一的一行将包含最多 100 个字符,包括英文大写字母、小写字母和连字符('-',ASCII 码为 45)。第一个字符始终是大写字母。连字符后面始终会紧跟一个大写字母。所有其他字符都将是小写字母。

输出格式

输出的第一行也是唯一的一行应包含相应的短缩写。

样例

输入样例 1

Knuth-Morris-Pratt

输出样例 1

KMP

输入样例 2

Mirko-Slavko

输出样例 2

MS

输入样例 3

Pasko-Patak

输出样例 3

PP

Discussions

About Discussions

The discussion section is only for posting: General Discussions (problem-solving strategies, alternative approaches), and Off-topic conversations.

This is NOT for reporting issues! If you want to report bugs or errors, please use the Issues section below.

Open Discussions 0
No discussions in this category.

Issues

About Issues

If you find any issues with the problem (statement, scoring, time/memory limits, test cases, etc.), you may submit an issue here. A problem moderator will review your issue.

Guidelines:

  1. This is not a place to publish discussions, editorials, or requests to debug your code. Issues are only visible to you and problem moderators.
  2. Do not submit duplicated issues.
  3. Issues must be filed in English or Chinese only.
Active Issues 0
No issues in this category.
Closed/Resolved Issues 0
No issues in this category.