回答編集履歴
2
追記
answer
CHANGED
@@ -1,6 +1,8 @@
|
|
1
1
|
◇謝辞
|
2
2
|
LouiS0616さんの回答を参考にさせて頂きました。
|
3
3
|
|
4
|
+
以下は**※11 0←のような入力はないと仮定した回答です。**
|
5
|
+
|
4
6
|
0. 区切り文字のスペースをreplace後に[Integer.parseInt](https://docs.oracle.com/javase/jp/8/docs/api/java/lang/Integer.html#parseInt-java.lang.String-)。
|
5
7
|
0. 判定はJudge関数を作成して比較は[Integer.compare](https://docs.oracle.com/javase/jp/8/docs/api/java/lang/Integer.html#compare-int-int-)を使うように
|
6
8
|
|
1
Integer.compareのAPIに合わせる形でx,yに
answer
CHANGED
@@ -20,8 +20,8 @@
|
|
20
20
|
}
|
21
21
|
}
|
22
22
|
|
23
|
-
private static void Judge(int
|
23
|
+
private static void Judge(int x, int y) {
|
24
|
-
int copareted = Integer.compare(
|
24
|
+
int copareted = Integer.compare(x, y);
|
25
25
|
// Swinch文を使った判定
|
26
26
|
// switch (copareted) {
|
27
27
|
// case 0:
|