문제 출처 : https://www.acmicpc.net/problem/15000
언어 : Kotlin
문제 설명 :
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.
제한 사항 :
- 시간 제한 : 2초
- 메모리 제한 : 512MB
입출력 예 :
입력 | 출력 |
alert | ALERT |
earthisunderattack | EARTHISUNDERATTACK |
canyoupickupsomegroceries | CANYOUPICKUPSOMEGROCERIES |
풀이 :
import java.io.BufferedWriter
import java.io.OutputStreamWriter
fun main() = with(System.`in`.bufferedReader()) {
val bw = BufferedWriter(OutputStreamWriter(System.out))
bw.write(readLine().uppercase())
bw.flush()
bw.close()
}
'백준 > 문제' 카테고리의 다른 글
10769번: 행복한지 슬픈지 (0) | 2024.02.05 |
---|---|
11944번: NN (1) | 2024.02.05 |
2870번: 수학숙제 (0) | 2024.02.02 |
9933번: 민균이의 비밀번호 (1) | 2024.02.01 |
1356번: 유진수 (0) | 2024.01.31 |
포스팅이 좋았다면 "좋아요❤️" 또는 "구독👍🏻" 해주세요!