結果
問題 |
No.1412 Super Ryuo
|
ユーザー |
![]() |
提出日時 | 2021-03-04 10:49:56 |
言語 | Java (openjdk 23) |
結果 |
WA
|
実行時間 | - |
コード長 | 584 bytes |
コンパイル時間 | 2,731 ms |
コンパイル使用メモリ | 75,392 KB |
実行使用メモリ | 56,468 KB |
最終ジャッジ日時 | 2024-10-04 15:02:43 |
合計ジャッジ時間 | 5,132 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 9 WA * 5 |
ソースコード
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); } } }