-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path4606.java
More file actions
49 lines (45 loc) · 968 Bytes
/
4606.java
File metadata and controls
49 lines (45 loc) · 968 Bytes
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
42
43
44
45
46
47
48
49
// 4606. The Seven Percent Solution
// 2019.09.04
// 문자열 처리, 영어 문제
import java.io.*;
import java.util.HashMap;
public class Main {
public static void main(String[] args) throws NumberFormatException, IOException {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
while (true) {
String s = br.readLine();
if (s.equals("#")) {
break;
}
for (int i = 0; i < s.length(); i++) {
switch (s.charAt(i)) {
case ' ':
System.out.print("%20");
break;
case '!':
System.out.print("%21");
break;
case '$':
System.out.print("%24");
break;
case '%':
System.out.print("%25");
break;
case '(':
System.out.print("%28");
break;
case ')':
System.out.print("%29");
break;
case '*':
System.out.print("%2a");
break;
default:
System.out.print(s.charAt(i));
break;
}
}
System.out.print("\n");
}
}
}