모든 챌린지
쉬움 0명 해결 정답률 0%

Initials From a Name

Build uppercase initials from a full name.

문제

Take the first letter of each word in full_name, uppercase it, and join the letters. Words are separated by one or more spaces.

Implement initials(full_name).

Input

full_name: A name made of letters and spaces.

Output

Return the initials, for example "ADL".

제약 조건

1 ≤ length of full_name ≤ 200; it contains at least one letter

예시

예시 1
입력:
full_name = "Ada Lovelace"

예상 출력:
expected = "AL"
입력:
std::string full_name = "Ada Lovelace";

예상 출력:
std::string expected = "AL";
입력:
string full_name = "Ada Lovelace";

예상 출력:
string expected = "AL";

설명

A from Ada and L from Lovelace: "AL".

예시 2
입력:
full_name = "grace  brewster  hopper"

예상 출력:
expected = "GBH"
입력:
std::string full_name = "grace  brewster  hopper";

예상 출력:
std::string expected = "GBH";
입력:
string full_name = "grace  brewster  hopper";

예상 출력:
string expected = "GBH";

설명

Extra spaces don't matter; the initials are uppercased: "GBH".

참고 자료

이 문제는 CodeUtility에 맞게 수정되었습니다. 위의 설명과 제한 조건을 따르세요.

다른 사람의 풀이 보기

커뮤니티 솔루션

아직 공개된 풀이가 없습니다. 문제를 풀고 첫 풀이를 공유하세요.