From c455d57480b2b2e55d95a729bb7203e2e9c888b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B0=95=EC=88=98=EB=AF=BC?= Date: Sun, 13 Oct 2024 02:11:03 +0900 Subject: [PATCH] CT_279 --- BOJ/Java/src/B4/Boj_27310_chino_shock.java | 26 ++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 BOJ/Java/src/B4/Boj_27310_chino_shock.java diff --git a/BOJ/Java/src/B4/Boj_27310_chino_shock.java b/BOJ/Java/src/B4/Boj_27310_chino_shock.java new file mode 100644 index 00000000..50baaf3b --- /dev/null +++ b/BOJ/Java/src/B4/Boj_27310_chino_shock.java @@ -0,0 +1,26 @@ +package B4; + +import java.io.BufferedReader; +import java.io.BufferedWriter; +import java.io.IOException; +import java.io.InputStreamReader; +import java.io.OutputStreamWriter; + +public class Boj_27310_chino_shock { + public static void main(String[] args) throws IOException { + BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); + BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(System.out)); + + char[] chars = br.readLine().toCharArray(); + int cnt = 0; + + for (int i = 1; i < chars.length - 1; i++) { + if (chars[i] == '_') { + cnt++; + } + } + + bw.write(Integer.toString(chars.length + 2 + cnt * 5)); + bw.flush(); + } +}