728x90
문자열 문제입니다.
string으로 문자를 받고 length()를 출력해주었습니다.
#include <iostream>
#include <string>
using namespace std;
int main(int argc, char *argv[])
{
string s;
cin >> s;
cout << s.length() << endl;
return 0;
}
'알고리즘' 카테고리의 다른 글
[C++] 백준 1100번 하얀 칸 (0) | 2019.09.09 |
---|---|
[C++] 백준 10808번 알파벳 개수 (0) | 2019.09.09 |
[C++] 백준 1158번 조세퍼스 문제 (0) | 2019.09.09 |
[C++] 백준 2312번 수 복원하기 (0) | 2019.09.09 |
[C++] 백준 2448번 별 찍기 - 11 (0) | 2019.09.09 |