Skip to content

Commit d9fa8aa

Browse files
committed
[Bronze III] Title: 열 개씩 끊어 출력하기, Time: 128 ms, Memory: 14404 KB -BaekjoonHub
1 parent 61c066e commit d9fa8aa

File tree

2 files changed

+38
-0
lines changed

2 files changed

+38
-0
lines changed
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# [Bronze III] 열 개씩 끊어 출력하기 - 11721
2+
3+
[문제 링크](https://www.acmicpc.net/problem/11721)
4+
5+
### 성능 요약
6+
7+
메모리: 14404 KB, 시간: 128 ms
8+
9+
### 분류
10+
11+
문자열, 구현
12+
13+
### 제출 일자
14+
15+
2024년 4월 2일 23:18:26
16+
17+
### 문제 설명
18+
19+
<p>알파벳 소문자와 대문자로만 이루어진 길이가 N인 단어가 주어진다.</p>
20+
21+
<p>한 줄에 10글자씩 끊어서 출력하는 프로그램을 작성하시오.</p>
22+
23+
### 입력
24+
25+
<p>첫째 줄에 단어가 주어진다. 단어는 알파벳 소문자와 대문자로만 이루어져 있으며, 길이는 100을 넘지 않는다. 길이가 0인 단어는 주어지지 않는다.</p>
26+
27+
### 출력
28+
29+
<p>입력으로 주어진 단어를 열 개씩 끊어서 한 줄에 하나씩 출력한다. 단어의 길이가 10의 배수가 아닌 경우에는 마지막 줄에는 10개 미만의 글자만 출력할 수도 있다.</p>
30+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
import java.io.*;
2+
import java.util.*;
3+
public class Main {
4+
public static void main(String[] args) throws IOException {
5+
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
6+
Arrays.stream(br.readLine().split("(?<=\\G.{10})")).forEach(System.out::println);
7+
}
8+
}

0 commit comments

Comments
 (0)