質問編集履歴
1
コード修正
title
CHANGED
File without changes
|
body
CHANGED
@@ -5,23 +5,21 @@
|
|
5
5
|
|
6
6
|
public class Main {
|
7
7
|
public static void main(String[] args) {
|
8
|
-
// 自分の得意な言語で
|
9
|
-
// Let's チャレンジ!!
|
10
8
|
|
11
9
|
Scanner sc = new Scanner(System.in);
|
12
10
|
String s = sc.next();//変換する前の値
|
13
11
|
//int i = Integer.parseInt(s);
|
14
|
-
if(1 <=
|
12
|
+
if(1 <= s && s <= 100){ //入力は1~100まで
|
15
|
-
|
13
|
+
//String ss = Integer.toString(s);
|
16
|
-
|
14
|
+
s.replace("A","4");
|
17
|
-
|
15
|
+
s.replace("E","3");
|
18
|
-
|
16
|
+
s.replace("G","6");
|
19
|
-
|
17
|
+
s.replace("I","1");
|
20
|
-
|
18
|
+
s.replace("O","0");
|
21
|
-
|
19
|
+
s.replace("S","5");
|
22
|
-
|
20
|
+
s.replace("Z","2");
|
23
21
|
|
24
|
-
System.out.println(
|
22
|
+
System.out.println(s);
|
25
23
|
}
|
26
24
|
}
|
27
25
|
}
|