반응형
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | #include <iostream> #include <cstdio> #include <string> #include <vector> #include <sstream> using namespace std; int main() { string s; getline(cin, s); stringstream ss(s); string str; int count = 0; while(ss >> str) { count++; } cout << count << endl; } | cs |
'알고리즘 > 백준' 카테고리의 다른 글
2920번 음계 (0) | 2018.10.09 |
---|---|
2908번 상수 (0) | 2018.10.09 |
2675번 문자열 반복 (0) | 2018.10.09 |
2448번 별찍기 (0) | 2018.10.09 |
1157번 단어공부 (0) | 2018.10.09 |