Compose a Hangul Syllable
Time limit1sMemory limit256 MB
Join the given choseong, jungseong, and optional jongseong into a single Hangul syllable and print it.
- Level
Easy2 of 10
- Topics
- Implementation, Math
- Solved
- No attempts yet
Problem
You are given one leading consonant (choseong), one vowel (jungseong), and one trailing consonant (jongseong). Write a program that joins the three jamo into a single Hangul syllable and prints it.
Input
The first line contains the choseong, the second line contains the jungseong, and the third line contains the jongseong. When the syllable has no jongseong, the third line is empty.
The choseong is one of ㄱ, ㄲ, ㄴ, ㄷ, ㄸ, ㄹ, ㅁ, ㅂ, ㅃ, ㅅ, ㅆ, ㅇ, ㅈ, ㅉ, ㅊ, ㅋ, ㅌ, ㅍ, ㅎ.
The jungseong is one of ㅏ, ㅐ, ㅑ, ㅒ, ㅓ, ㅔ, ㅕ, ㅖ, ㅗ, ㅘ, ㅙ, ㅚ, ㅛ, ㅜ, ㅝ, ㅞ, ㅟ, ㅠ, ㅡ, ㅢ, ㅣ.
The jongseong is one of ㄱ, ㄲ, ㄳ, ㄴ, ㄵ, ㄶ, ㄷ, ㄹ, ㄺ, ㄻ, ㄼ, ㄽ, ㄾ, ㄿ, ㅀ, ㅁ, ㅂ, ㅄ, ㅅ, ㅆ, ㅇ, ㅈ, ㅊ, ㅋ, ㅌ, ㅍ, ㅎ.
Output
Print, on the first line, the syllable formed from the given choseong, jungseong, and jongseong, encoded in UTF-8. The composed syllable always falls in the Unicode range U+AC00 to U+D7A3.