Notice
Recent Posts
Recent Comments
Link
삐까냥의 파도타기
2941번) 크로아티아 알파벳 본문
문제 출처 : https://www.acmicpc.net/problem/2941
import java.util.Scanner; public class Q1475 { public static void main(String[] args) { Scanner sc = new Scanner(System.in); String string = sc.nextLine();
string = string.replaceAll("dz=", "a"); string = string.replaceAll("lj", "a"); string = string.replaceAll("nj", "a"); string = string.replaceAll("c-", "a"); string = string.replaceAll("d-", "a"); string = string.replaceAll("c=", "a"); string = string.replaceAll("s=", "a"); string = string.replaceAll("z=", "a"); System.out.println(string.length()); } }
|
'코딩 > 백준 알고리즘' 카테고리의 다른 글
9935번) 문자열 폭발 (0) | 2017.11.11 |
---|---|
1764번) 듣보잡 (0) | 2017.11.11 |
2743번) 단어 길이 재기 (0) | 2017.11.11 |
1032번) 명령 프롬프트 (0) | 2017.11.11 |
10808번) 알파벳 개수 (0) | 2017.11.11 |