boj)11721 - 열 개씩 끊어 출력하기

2020. 11. 5. 14:40PS/boj

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
import java.io.*;
 
public class boj_11721 {
    static BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
 
    public static void main(String[] args) throws IOException {
        String str = br.readLine();
        int length = str.length();
 
        while (length >= 10) {
            String substring = str.substring(010);
            System.out.println(substring);
            str = str.substring(10);
            length -= 10;
        }
 
        System.out.println(str);
    }
}
 
cs

 

 

 


www.acmicpc.net/problem/11721

'PS > boj' 카테고리의 다른 글

boj)1316 - 그룹 단어 체커  (0) 2020.11.05
boj)11719 - 그대로 출력하기 2  (0) 2020.11.05
boj)4963 - 섬의 개수  (0) 2020.11.03
boj)1707 - 이분그래프  (0) 2020.11.03
boj)11724 - 연결 요소의 개수  (0) 2020.11.02