https://github.com/letsdeepchat/autori
https://github.com/letsdeepchat/autori
Last synced: 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/letsdeepchat/autori
- Owner: letsdeepchat
- Created: 2021-11-20T14:36:38.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2021-11-20T14:38:16.000Z (over 4 years ago)
- Last Synced: 2025-04-06T09:53:01.287Z (12 months ago)
- Size: 1.95 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Autori
Autori
Great scientific discoveries are often named by the last names of scientists that made them. For example, the most popular asymmetric cryptography system, RSA was discovered by Rivest, Shamir and Adleman. Another notable example is the Knuth-Morris-Pratt algorithm, named by Knuth, Morris and Pratt.
Scientific papers reference earlier works a lot and itβs not uncommon for one document to use two different naming conventions: the short variation (e.g. KMP) using only the first letters of authors last names and the long variation (e.g. Knuth-Morris-Pratt) using complete last names separated by hyphens.
We find mixing two conventions in one paper to be aesthetically unpleasing and would like you to write a program that will transform long variations into short.
Input
The first and only line of input will contain at most 100 characters, uppercase and lowercase letters of the English alphabet and hyphen (β-β ASCII 45). The first character will always be an uppercase letter. Hyphens will always be followed by an uppercase letter. All other characters will be lowercase letters.
Output
The first and only line of output should contain the appropriate short variation.
Sample Input 1
Knuth-Morris-Pratt
Sample Output 1
KMP
Sample Input 2
Mirko-Slavko
Sample Output 2
MS
Sample Input 3
Pasko-Patak
Sample Output 3
PP