質問するログイン新規登録

質問編集履歴

1

コード修正

2019/11/12 12:01

投稿

NIKONIKONIKONIK
NIKONIKONIKONIK

スコア83

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 <= i && i <= 100){ //入力は1~100まで
12
+ if(1 <= s && s <= 100){ //入力は1~100まで
15
- // String ss = Integer.toString(i);
13
+ //String ss = Integer.toString(s);
16
- ss.replace("A","4");
14
+ s.replace("A","4");
17
- ss.replace("E","3");
15
+ s.replace("E","3");
18
- ss.replace("G","6");
16
+ s.replace("G","6");
19
- ss.replace("I","1");
17
+ s.replace("I","1");
20
- ss.replace("O","0");
18
+ s.replace("O","0");
21
- ss.replace("S","5");
19
+ s.replace("S","5");
22
- ss.replace("Z","2");
20
+ s.replace("Z","2");
23
21
 
24
- System.out.println(ss);
22
+ System.out.println(s);
25
23
  }
26
24
  }
27
25
  }