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
32
33
34
35
36
37
38
39
40
41
|
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.util.StringTokenizer;
public class Main {
public static void main(String[] args) throws IOException {
// TODO Auto-generated method stub
BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
//StringTokenizer st = new StringTokenizer(in.readLine());
BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(System.out));
String bokho, amho;
bokho = in.readLine();
amho = in.readLine();
int i;
for (i = 0; i < amho.length(); i++) {
if (Character.isAlphabetic(amho.charAt(i))) {
if (Character.isUpperCase(amho.charAt(i))) {
bw.write(Character.toUpperCase(bokho.charAt(amho.charAt(i)-'A')));
bw.flush();
}
else {
bw.write(bokho.charAt(amho.charAt(i) - 'a'));
bw.flush();
}
}
else {
bw.write(amho.charAt(i));
bw.flush();
}
}
}
}
|
cs |
http://www.jungol.co.kr/bbs/board.php?bo_table=pbank&wr_id=1153&sca=2050
'정올문제소스코드' 카테고리의 다른 글
3699 : 변장 (0) | 2021.10.08 |
---|---|
1516 : 단어 세기 (0) | 2021.10.08 |
2857 : 세로읽기 (0) | 2021.08.11 |
2514 : 문자열 찾기 (0) | 2021.08.11 |
2604 : 그릇 (0) | 2021.08.11 |