[백준] 2902 - AUTORI



문제 정보


  • 문제 이름: AUTORI (원문)
  • 문제 번호: 2902
  • 문제 유형: 알고리즘 - 문자열 처리
  • 풀이 언어: C
  • 제출 시간: 2019년 5월 1일 14시 53분 31초
  • 원본 링크: https://www.acmicpc.net/problem/2902



문제

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 KnuthMorris-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.



입력

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.



출력

The first and only line of output should contain the appropriate short variation.



결과 - 소스코드 및 랭크






메모

단순한 문제였던 것만큼 더 간단하게 소스코드를 작성하지 않으면 안되는 문제였던 것 같다. 소스코드가 329B 나왔는데 10단위로 끝내신 분도 있는 것을 보고 흠… 더 단순화 할 수 있는 방법을 찾아봐야겠다.

Author

Alec J

Posted on

2019-05-01

Updated on

2021-02-09

Licensed under