Study (etc)/Problem Solving
[BOJ / C++] 2743번 : 단어 길이 재기
Haren
2022. 4. 1. 21:15
문제
알파벳으로만 이루어진 단어를 입력받아, 그 길이를 출력하는 프로그램을 작성하시오.
입력
첫째 줄에 영어 소문자와 대문자로만 이루어진 단어가 주어진다. 단어의 길이는 최대 100이다.
출력
첫째 줄에 입력으로 주어진 단어의 길이를 출력한다.
Solved.ac 레벨
브론즈II
풀이
#include <bits/stdc++.h>
using namespace std;
int main(){
ios::sync_with_stdio(false);
cin.tie(NULL);
cout.tie(NULL);
string sStr;
cin >> sStr;
cout << sStr.length() << endl;
return 0;
}
https://acmicpc.net/problem/2743