Skip to content

Commit

Permalink
Solve Problem 1152
Browse files Browse the repository at this point in the history
  • Loading branch information
gnidoc327 committed Jan 11, 2019
1 parent 8b5f7e4 commit c3d9eda
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions src/step_by_step/step6/Problem1152/Main.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
// https://www.acmicpc.net/problem/1152

package step_by_step.step6.Problem1152;


import java.util.Scanner;

public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
String[] strs = sc.nextLine().trim().split(" ");

int count = 0;
for (String str : strs) {
if (!str.isEmpty()) {
count++;
}
}
System.out.println(count);
}
}

0 comments on commit c3d9eda

Please sign in to comment.