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
- 코딩테스트
- greedy
- two pointers
- Binary Tree
- Stack
- Method
- Matrix
- Binary Search
- Number Theory
- Class
- database
- sorting
- SQL
- java
- array
- bit manipulation
- simulation
- hash table
- string
- 자바
- Counting
- dynamic programming
- Tree
- 구현
- Math
- Data Structure
- 코테
- 파이썬
- geometry
- implement
Archives
- Today
- Total
코린이의 소소한 공부노트
[백준 온라인 저지] 27866. 문자와 문자열 본문
- 입력: 첫째 줄에 영어 소문자와 대문자로만 이루어진 단어 S가 주어진다. 단어의 길이는 최대 1,000이다.
둘째 줄에 정수 i가 주어진다. (1 <= i <= S의 길이)
- 출력: S의 i번째 글자를 출력한다.
import java.util.*;
class Main{
public static void main(String[] args){
Scanner scan = new Scanner(System.in);
String input = scan.next();
int i = scan.nextInt();
System.out.println(input.charAt(i-1));
}
}
'코딩테스트 풀이 > JAVA' 카테고리의 다른 글
[백준 온라인 저지] 10988. 팰린드롬인지 확인하기 (0) | 2023.03.17 |
---|---|
[백준 온라인 저지] 2444. 별 찍기 - 7 (0) | 2023.03.17 |
[LeetCode/Easy] 2529. Maximum Count of Positive Integer and Negative Integer (0) | 2023.03.16 |
[LeetCode/Easy] 682. Baseball Game (0) | 2023.03.16 |
[LeetCode/Easy] 2535. Difference Between Element Sum and Digit Sum of an Array (0) | 2023.03.13 |