Skip to content

Commit

Permalink
CT_279
Browse files Browse the repository at this point in the history
  • Loading branch information
Jade-Good committed Oct 12, 2024
1 parent f036c53 commit c455d57
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions BOJ/Java/src/B4/Boj_27310_chino_shock.java
Original file line number Diff line number Diff line change
@@ -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();
}
}

0 comments on commit c455d57

Please sign in to comment.