본문 바로가기
공부/코딩테스트

백준: 15000번 CAPS (Python3)

by 혼밥맨 2022. 8. 6.
반응형

백준: 15000번 CAPS (Python3)

CAPS 성공다국어

 
시간 제한메모리 제한제출정답맞힌 사람정답 비율
2 초 512 MB 1500 1117 957 76.683%

문제

지구가 공격받고 있다! 상황이 심각하다는 것을 분명히 하는 메시지를 지구방위군(EDF)에 보내야 합니다. EDF의 가장 강력한 부대는 일본 십대들이 조종하는 메크(거대 이족보행 로봇)로 구성됩니다. 메시지가 긴급하게 표시되도록 하려면 조종사의 모니터에 대문자로 표시되어야 합니다. 불행히도 EDF에서 사용하는 타키온 통신 시스템은 소문자 알파벳 문자로만 문자열을 보낼 수 있습니다.

소문자 알파벳 문자 집합은 'a', 'b', 'c', 'd', 'e', ​​'f', 'g', 'h', 'i' 문자로 구성됩니다. ', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z'.

당신의 임무는 주어진 메시지를 대문자로 변환하는 프로그램을 작성하는 것입니다.

Earth is under attack! Messages need to be sent to the Earth Defense Force (EDF) that makes clear that the situation is dire. The EDF’s strongest forces consist of mechs (huge bipedal robots) that are piloted by Japanese teenagers. To make sure that the messages come across as urgent, they must be displayed on the monitors of the pilots in uppercase letters. Unfortunately, the tachyon communication system that is used by the EDF is only able to send strings in lower-case alphabetic characters.

The set of lower-case alphabetic characters is made up of the following characters: ’a’, ’b’, ’c’, ’d’, ’e’, ’f’, ’g’, ’h’, ’i’, ’j’, ’k’, ’l’, ’m’, ’n’, ’o’, ’p’, ’q’, ’r’, ’s’, ’t’, ’u’, ’v’, ’w’, ’x’, ’y’, ’z’.

Your job is to write a program that converts the given messages to upper-case.

입력

  • A single line containing a string of length n (100 ≤ n ≤ 106), consisting of lower-case alphabetic characters.

출력

  • A single line containing the input string where all letters are converted to upper-case letters.

예제 입력 1 

alert

예제 출력 1 

ALERT

예제 입력 2 

earthisunderattack

예제 출력 2 

EARTHISUNDERATTACK

예제 입력 3 

canyoupickupsomegroceries

예제 출력 3 

CANYOUPICKUPSOMEGROCERIES

답안

1
print(input().upper())
cs

반응형

댓글