Logo
(追記) (追記ここまで)

7120번 - String 다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
1 초 128 MB61743839572.344%

문제

It sometimes happens that a button on the computer keyboard sticks and then in the printed text there are more than one identical letters. For example, the word "piano" can change into "ppppppiaanooooo".

Your task is to write a program that corrects these errors: finds all the places within the given string, where identical letters follow each other and replaces them with one letter- that is, erases all the other identical letters and adds the remaining part of the string onto the end of the one remaining letter.

입력

The first line of the input is a string containing only lowercase latin letters. The string is at most 250 symbols in length.

출력

Output the corrected string in the first line of the output.

제한

예제 입력 1

ppppppiaanooooo

예제 출력 1

piano

힌트

출처

Olympiad > Latvian olympiad in informatics > 12th Latvian olympiad in informatics > Stage II (District/City) 1번

(追記) (追記ここまで)

출처

대학교 대회

  • 사업자 등록 번호: 541-88-00682
  • 대표자명: 최백준
  • 주소: 서울시 서초구 서초대로74길 29 서초파라곤 412호
  • 전화번호: 02-521-0487 (이메일로 연락 주세요)
  • 이메일: contacts@startlink.io
  • 통신판매신고번호: 제 2017-서울서초-2193 호

AltStyle によって変換されたページ (->オリジナル) /