結果

問題 No.1412 Super Ryuo
ユーザー tentententen
提出日時 2021-03-01 12:32:12
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 413 bytes
コンパイル時間 1,932 ms
コンパイル使用メモリ 74,004 KB
実行使用メモリ 54,392 KB
最終ジャッジ日時 2024-04-14 03:39:19
合計ジャッジ時間 4,531 ms
ジャッジサーバーID
(参考情報)
judge1 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 125 ms
54,392 KB
testcase_01 AC 127 ms
54,076 KB
testcase_02 AC 125 ms
53,892 KB
testcase_03 AC 127 ms
54,204 KB
testcase_04 WA -
testcase_05 WA -
testcase_06 AC 126 ms
53,980 KB
testcase_07 AC 115 ms
52,692 KB
testcase_08 AC 113 ms
53,116 KB
testcase_09 AC 114 ms
52,968 KB
testcase_10 AC 129 ms
54,388 KB
testcase_11 AC 127 ms
54,216 KB
testcase_12 AC 126 ms
54,080 KB
testcase_13 AC 126 ms
54,060 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        long a = sc.nextInt();
        long b = sc.nextInt();
        long c = sc.nextInt();
        long d = sc.nextInt();
        if (Math.abs(a - c) + Math.abs(b - d) <= 3) {
            System.out.println(1);
        } else {
            System.out.println(2);
        }
    }
}
0