You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<p>문자열 <code>my_string</code>, <code>overwrite_string</code>과 정수 <code>s</code>가 주어집니다. 문자열 <code>my_string</code>의 인덱스 <code>s</code>부터 <code>overwrite_string</code>의 길이만큼을 문자열 <code>overwrite_string</code>으로 바꾼 문자열을 return 하는 solution 함수를 작성해 주세요.</p>
24
+
25
+
<hr>
26
+
27
+
<h5>제한사항</h5>
28
+
29
+
<ul>
30
+
<li><code>my_string</code>와 <code>overwrite_string</code>은 숫자와 알파벳으로 이루어져 있습니다.</li>
31
+
<li>1 ≤ <code>overwrite_string</code>의 길이 ≤ <code>my_string</code>의 길이 ≤ 1,000</li>
32
+
<li>0 ≤ <code>s</code> ≤ <code>my_string</code>의 길이 - <code>overwrite_string</code>의 길이</li>
33
+
</ul>
34
+
35
+
<hr>
36
+
37
+
<h5>입출력 예</h5>
38
+
<tableclass="table">
39
+
<thead><tr>
40
+
<th>my_string</th>
41
+
<th>overwrite_string</th>
42
+
<th>s</th>
43
+
<th>result</th>
44
+
</tr>
45
+
</thead>
46
+
<tbody><tr>
47
+
<td>"He11oWor1d"</td>
48
+
<td>"lloWorl"</td>
49
+
<td>2</td>
50
+
<td>"HelloWorld"</td>
51
+
</tr>
52
+
<tr>
53
+
<td>"Program29b8UYP"</td>
54
+
<td>"merS123"</td>
55
+
<td>7</td>
56
+
<td>"ProgrammerS123"</td>
57
+
</tr>
58
+
</tbody>
59
+
</table>
60
+
<hr>
61
+
62
+
<h5>입출력 예 설명</h5>
63
+
64
+
<p>입출력 예 #1</p>
65
+
66
+
<ul>
67
+
<li>예제 1번의 <code>my_string</code>에서 인덱스 2부터 <code>overwrite_string</code>의 길이만큼에 해당하는 부분은 "11oWor1"이고 이를 "lloWorl"로 바꾼 "HelloWorld"를 return 합니다.</li>
68
+
</ul>
69
+
70
+
<p>입출력 예 #2</p>
71
+
72
+
<ul>
73
+
<li>예제 2번의 <code>my_string</code>에서 인덱스 7부터 <code>overwrite_string</code>의 길이만큼에 해당하는 부분은 "29b8UYP"이고 이를 "merS123"로 바꾼 "ProgrammerS123"를 return 합니다.</li>
74
+
</ul>
75
+
76
+
77
+
> 출처: 프로그래머스 코딩 테스트 연습, https://school.programmers.co.kr/learn/challenges
0 commit comments