Notice
Recent Posts
Recent Comments
- Today
- Total
01-10 22:06
Tags
- BFS
- leetcode
- PS
- dp
- pytorch
- ๊ตฌํ
- database
- ๋ฌธ๋ฒ
- ๋ฐ์ดํฐ๋ฒ ์ด์ค
- CS
- ๋ฐฑ์๋
- ์ธํด
- java
- ์์์ ๋ ฌ
- tree
- ํ๋ก๊ทธ๋๋จธ์ค
- ๋ฐฑ์ค
- ์๋ฐ์์ ์
- ๋ฒจ๋งํฌ๋
- ์๋ฐ
- spring
- Algorithm
- Graph
- ๋ค์ต์คํธ๋ผ
- array
- ์กธ์ ์ํ
- ๊ทธ๋ฆฌ๋
- MST
- ์๋ฃ๊ตฌ์กฐ
- OOP
Link
Partially Committed
[ํ๋ก๊ทธ๋๋จธ์ค] ์ด์ํ ๋ฌธ์ ๋ง๋ค๊ธฐ ๋ณธ๋ฌธ
๐ฅ Algorithm || ๋ฌธ์ ํ์ด/PS
[ํ๋ก๊ทธ๋๋จธ์ค] ์ด์ํ ๋ฌธ์ ๋ง๋ค๊ธฐ
WonderJay 2022. 7. 6. 23:39728x90
๋ฐ์ํ
SMALL
https://school.programmers.co.kr/learn/courses/30/lessons/12930#
๋จ์ด ์ฌ์ด์ ๊ณต๋ฐฑ์ด ์ฌ๋ฌ ๊ฐ ์์ ์ ์๋ค๋ ๊ฒ์ ์ฃผ์ํ์!
( ๋จ์ด ์ฌ์ด๋ ๋ฌด์กฐ๊ฑด ๊ณต๋ฐฑ์ด ํ๋์ผ ์ค ์๊ณ , stringstream ์ผ๋ก ์ฒ๋ฆฌํ๋ค๊ฐ ํ์ฐธ๋์ ๋ง์ํ ํด๋ฒ๋ ธ๋ค. )
[C++]
#include <bits/stdc++.h>
#define fastio cin.tie(0)->sync_with_stdio(0)
#define ll long long
using namespace std;
string solution(string s) {
string answer = "";
for (int i = 0; i < s.size(); i++)
{
if (s[i] == ' ')
{
continue;
}
else
{
for (int k = 0; k < s.size() && i < s.size(); k++, i++)
{
if (s[i] == ' ') break;
if (k % 2 == 0) s[i] = toupper(s[i]);
else if (k % 2 == 1) s[i] = tolower(s[i]);
}
}
}
answer = s;
return answer;
}
728x90
๋ฐ์ํ
LIST
'๐ฅ Algorithm || ๋ฌธ์ ํ์ด > PS' ์นดํ ๊ณ ๋ฆฌ์ ๋ค๋ฅธ ๊ธ
[2020 KAKAO BLIND RECRUITMENT] ๊ดํธ ๋ณํ (0) | 2022.07.08 |
---|---|
[2019 KAKAO BLIND RECRUITMENT] ์คํ์ฑํ ๋ฐฉ (0) | 2022.07.07 |
[ํ๋ก๊ทธ๋๋จธ์ค] ์์ ์ฐพ๊ธฐ (0) | 2022.07.06 |
[ํ๋ก๊ทธ๋๋จธ์ค] ๋ฌธ์์ด ๋ด ๋ง์๋๋ก ์ ๋ ฌํ๊ธฐ (0) | 2022.07.06 |
[ํ๋ก๊ทธ๋๋จธ์ค] ๊ฐ์ ์ซ์๋ ์ซ์ด (0) | 2022.07.06 |
Comments