알고리즘/백준2021. 7. 7. 21:52[java] 백준 1316번 그룹 단어 체커
import java.util.Scanner; class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); // 단어의 개수를 입력받기 int n = sc.nextInt(); int count = 0; for (int i = 0; i < n; i++) { String s = sc.next(); // checker(s)가 true 인 경우에만 count if (checker(s)) { count++; } } System.out.println(count); } public static boolean checker(String s) { // 이전 문자를 나타내는 previous int previous = 0;..