
[백준] 1152번 : 단어의 개수 파이썬(python), 자바(java) 풀이
·
Algorithm/PS
1152번: 단어의 개수 (acmicpc.net) 1152번: 단어의 개수 첫 줄에 영어 대소문자와 공백으로 이루어진 문자열이 주어진다. 이 문자열의 길이는 1,000,000을 넘지 않는다. 단어는 공백 한 개로 구분되며, 공백이 연속해서 나오는 경우는 없다. 또한 문자열 www.acmicpc.net 💫 파이썬 풀이 total = list(input().split()) print(len(total)) 📑 list()를 생략해도 결과는 같다. 💫 자바 풀이 import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.StringTokenizer; public class R..