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 | 31 |
Tags
- 파이썬
- Tree
- Matrix
- java
- Class
- database
- dynamic programming
- Number Theory
- string
- Binary Tree
- 구현
- array
- SQL
- Method
- Stack
- bit manipulation
- Counting
- Binary Search
- Math
- Data Structure
- two pointers
- simulation
- 코딩테스트
- implement
- greedy
- sorting
- hash table
- 코테
- 자바
- geometry
Archives
- Today
- Total
코린이의 소소한 공부노트
[프로그래머스/Lv.0] 편지 본문
1. Input
1) 축하 문구 message
2. Output
1) 필요한 편지지의 최소 가로길이
3. Constraint
1) 글자 1개의 가로는 2cm
2) 공백도 하나의 문자로 취급한다.
3) 1 ≤ message의 길이 ≤ 50
4) 편지지의 여백은 생각하지 않는다.
5) message는 영문 알파벳 대소문자, ‘!’, ‘~’ 또는 공백으로만 이루어져 있다.
4. Example
Input: message="happy birthday!" -> Output: 30
5. Code
1) 첫 코드(2022/10/17)
return message.length()*2;
'코딩테스트 풀이 > JAVA' 카테고리의 다른 글
[프로그래머스/Lv.0] 문자열 계산하기 (0) | 2022.10.31 |
---|---|
[프로그래머스/Lv.0] 가장 큰 수 찾기 (0) | 2022.10.31 |
[프로그래머스/Lv.0] 약수 구하기 (0) | 2022.10.31 |
[프로그래머스/Lv.0] 한 번만 등장한 문자 (0) | 2022.10.31 |
[프로그래머스/Lv.0] 인덱스 바꾸기 (0) | 2022.10.31 |