[백준] P1152

동민·2021년 3월 11일
import java.util.Scanner;

public class P1152 {

	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);

		String str = sc.nextLine();

		String[] arr = str.split(" ");
		int count = 0;
		for(int i = 0 ; i < arr.length; i++) {
			
			if(arr[i].length() >= 1) {
				count ++;
			}
		}
		System.out.println(count);

		sc.close();

	}
}
profile
BE Developer

0개의 댓글