Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | 6 | 7 |
8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 | 16 | 17 | 18 | 19 | 20 | 21 |
22 | 23 | 24 | 25 | 26 | 27 | 28 |
29 | 30 |
Tags
- Data Structure
- bit manipulation
- 구현
- simulation
- greedy
- hash table
- Binary Search
- 코딩테스트
- Binary Tree
- Number Theory
- Counting
- Math
- Stack
- two pointers
- geometry
- 파이썬
- implement
- array
- 자바
- java
- Tree
- 코테
- database
- Matrix
- Class
- SQL
- sorting
- string
- Method
- dynamic programming
Archives
- Today
- Total
코린이의 소소한 공부노트
[프로그래머스/Lv.0] 문자열의 뒤의 n글자 본문
1. Input, Output, Example
- my_string의 뒤 n글자를 반환
2. Constraint
1) my_string은 숫자와 알파벳으로 이루어져 있다.
2) 1 ≤ my_string의 길이 ≤ 1,000
3) 1 ≤ n ≤ my_string의 길이
3. Code
1) 첫 코드(2023/04/24)
class Solution {
public String solution(String my_string, int n) {
return my_string.substring(my_string.length()-n,my_string.length());
}
}
'코딩테스트 풀이 > JAVA' 카테고리의 다른 글
[프로그래머스/Lv.0] 조건에 맞게 수열 변환하기 3 (0) | 2023.04.24 |
---|---|
[프로그래머스/Lv.0] 정수 찾기 (0) | 2023.04.24 |
[프로그래머스/Lv.0] 소문자로 바꾸기 (0) | 2023.04.24 |
[프로그래머스/Lv.0] 특수문자 출력하기 (0) | 2023.04.24 |
[프로그래머스/Lv.0] 대소문자 바꿔서 출력하기 (0) | 2023.04.24 |