結果

問題 No.1412 Super Ryuo
ユーザー xRS43BofaUEZ5gcxRS43BofaUEZ5gc
提出日時 2021-03-04 10:49:56
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 584 bytes
コンパイル時間 4,104 ms
コンパイル使用メモリ 74,900 KB
実行使用メモリ 56,480 KB
最終ジャッジ日時 2024-04-15 04:10:52
合計ジャッジ時間 7,133 ms
ジャッジサーバーID
(参考情報)
judge3 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 143 ms
54,104 KB
testcase_01 AC 143 ms
54,100 KB
testcase_02 AC 140 ms
53,988 KB
testcase_03 AC 145 ms
54,032 KB
testcase_04 AC 145 ms
54,180 KB
testcase_05 WA -
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 AC 136 ms
54,120 KB
testcase_11 AC 135 ms
54,412 KB
testcase_12 AC 135 ms
54,132 KB
testcase_13 AC 136 ms
54,248 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class HelloWorld {

	    public static void main(String[] args) throws Exception {

	    	Scanner sc = new Scanner(System.in);
	    	int[] xy_initial = new int[2];
	    	int[] xy_goal = new int[2];
	    	xy_initial[0] = sc.nextInt();
	    	xy_initial[1] = sc.nextInt();
	    	xy_goal[0] = sc.nextInt();
	    	xy_goal[0] = sc.nextInt();
	    	sc.close();


	    	if (Math.abs(xy_goal[0] - xy_initial[0]) +
	    		 Math.abs(xy_goal[1] - xy_initial[1]) > 3) {
	    		System.out.println(2);
	    	}else {
	    		System.out.println(1);
	    	}

	    	}

}
0