๐ฆฅ ์ฝํ
/BAEKJOON
[BAEKJOON C++] 4458_์ฒซ ๊ธ์๋ฅผ ๋๋ฌธ์๋ก
์ง์ง์ํ์นด
2023. 8. 9. 00:00
728x90
๋ฐ์ํ
๋ฌธ์ฅ์ ์ฝ์ ๋ค, ์ค์ ์ฒซ ๊ธ์๋ฅผ ๋๋ฌธ์๋ก ๋ฐ๊พธ๋ ํ๋ก๊ทธ๋จ์ ์์ฑํ์์ค.
์ ๋ ฅ
์ฒซ์งธ ์ค์ ์ค์ ์ N์ด ์ฃผ์ด์ง๋ค.
๋ค์ N๊ฐ์ ์ค์๋ ๋ฌธ์ฅ์ด ์ฃผ์ด์ง๋ค.
๊ฐ ๋ฌธ์ฅ์ ๋ค์ด์๋ ๊ธ์์ ์๋ 30์ ๋์ง ์๋๋ค.
๋ชจ๋ ์ค์ ์ฒซ ๋ฒ์งธ ๊ธ์๋ ์ํ๋ฒณ์ด๋ค.
์ถ๋ ฅ
๊ฐ ์ค์ ์ฒซ๊ธ์๋ฅผ ๋๋ฌธ์๋ก ๋ฐ๊พผ๋ค ์ถ๋ ฅํ๋ค.
// [4458] ์ฒซ ๊ธ์๋ฅผ ๋๋ฌธ์๋ก
/*
๋ฌธ์ฅ์ ์ฝ์ ๋ค, ์ค์ ์ฒซ ๊ธ์๋ฅผ ๋๋ฌธ์๋ก ๋ฐ๊พธ๋ ํ๋ก๊ทธ๋จ์ ์์ฑํ์์ค.
์
๋ ฅ
์ฒซ์งธ ์ค์ ์ค์ ์ N์ด ์ฃผ์ด์ง๋ค.
๋ค์ N๊ฐ์ ์ค์๋ ๋ฌธ์ฅ์ด ์ฃผ์ด์ง๋ค.
๊ฐ ๋ฌธ์ฅ์ ๋ค์ด์๋ ๊ธ์์ ์๋ 30์ ๋์ง ์๋๋ค.
๋ชจ๋ ์ค์ ์ฒซ ๋ฒ์งธ ๊ธ์๋ ์ํ๋ฒณ์ด๋ค.
์ถ๋ ฅ
๊ฐ ์ค์ ์ฒซ๊ธ์๋ฅผ ๋๋ฌธ์๋ก ๋ฐ๊พผ๋ค ์ถ๋ ฅํ๋ค.
*/
#define _CRT_SECURE_NO_WARNINGS
// ํ์ค ์คํธ๋ฆผ์์ ์ฝ๊ธฐ ๋ฐ ์ฐ๊ธฐ๋ฅผ ์ ์ดํ๋ ๊ฐ์ฒด๋ฅผ ์ ์ธ
#include <iostream>
#include <algorithm> // find
#include <string>
#include <cmath> // abs
#include <vector>
#include <queue>
using namespace std;
int main() {
int n;
string str;
cin >> n;
cin.ignore();
while (n--) {
getline(cin, str);
// A(65)~ Z(90), a(97)~z(122)
if (str[0] >= 97) {
str[0] = str[0] - 32;
}
cout << str << '\n';
}
return 0;
}
728x90
๋ฐ์ํ