# 단어의 개수
from sys import stdin
word = stdin.readline()
array = word.split(' ')
cnt = 0
for i in array:
if i == '':
cnt += 1
elif i == '\n':
cnt += 1
print(len(array) - cnt)
[파이썬] 백준 1316: 그룹 단어 체커 (구현, 문자열) (0) | 2021.08.28 |
---|---|
[파이썬] 백준 1157: 단어 공부 (구현, 문자열) (0) | 2021.08.28 |
[파이썬] 백준 5585: 거스름돈 (그리디 알고리즘) (0) | 2021.08.28 |
[파이썬] 백준 2217: 로프 (그리디 알고리즘) (0) | 2021.08.28 |
[파이썬] 백준 1946: 신입 사원 (그리디 알고리즘) (0) | 2021.08.28 |