Skip to content

Commit 7baa27e

Browse files
committed
문자열 붙여서 출력하기
1 parent f2d4dee commit 7baa27e

File tree

2 files changed

+62
-0
lines changed

2 files changed

+62
-0
lines changed

Lv0/appendString.md

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
# 문자열 붙여서 출력하기
2+
3+
## 📌 문제 설명
4+
5+
두 개의 문자열 str1, str2가 공백으로 구분되어 입력으로 주어집니다.
6+
입출력 예와 같이 str1과 str2을 이어서 출력하는 코드를 작성해 보세요.
7+
8+
### 제한 조건
9+
10+
- 1 ≤ str1, str2의 길이 ≤ 10
11+
12+
### 입출력 예
13+
14+
입력 #1
15+
16+
```text/plain
17+
apple pen
18+
```
19+
20+
출력 #1
21+
22+
```text/plain
23+
applepen
24+
```
25+
26+
입력 #2
27+
28+
```text/plain
29+
Hello World!
30+
```
31+
32+
출력 #2
33+
34+
```text/plain
35+
HelloWorld!
36+
```
37+
38+
39+
# 🧐 접근
40+
41+
진짜 출력만 하면 된다.
42+
43+
```java
44+
import java.util.Scanner;
45+
public class Solution {
46+
public static void main(String[] args) {
47+
Scanner sc = new Scanner(System.in);
48+
String a = sc.next();
49+
String b = sc.next();
50+
System.out.print(a + b);
51+
}
52+
}
53+
```
54+
55+
# 💡 풀이
56+
57+
접근법과 동일
58+
59+
# 📘 그 외의 풀이
60+
61+
### ==================

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@
5959
- [54. n의 배수](./Lv0/multipleOfN.md)
6060
- [55. 소문자로 바꾸기](./Lv0/toLowerCase.md)
6161
- [56. 정수 부분](./Lv0/valueOfInt.md)
62+
- [57. 문자열 붙여서 출력하기](./Lv0/appendString.md)
6263

6364
# 📘 Lv.1
6465

0 commit comments

Comments
 (0)