結果
| 問題 |
No.410 出会い
|
| ユーザー |
|
| 提出日時 | 2019-02-13 18:00:05 |
| 言語 | Java (openjdk 23) |
| 結果 |
AC
|
| 実行時間 | 138 ms / 2,000 ms |
| コード長 | 517 bytes |
| コンパイル時間 | 2,292 ms |
| コンパイル使用メモリ | 74,180 KB |
| 実行使用メモリ | 54,344 KB |
| 最終ジャッジ日時 | 2024-09-13 11:09:11 |
| 合計ジャッジ時間 | 6,348 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 19 |
ソースコード
import java.util.*;
class Main {
static Scanner sc = new Scanner(System.in);
public static void main(String[] args) {
System.out.println((double)calcManhatDistance(sc.nextInt(),sc.nextInt(),sc.nextInt(),sc.nextInt())/2);
}
static int calcManhatDistance (int x1, int y1, int x2, int y2) {
int d = Math.abs(x1-x2)+Math.abs(y1-y2);
return d;
}
static double calcEuclidDistance (double x1, double y1, double x2, double y2) {
double d = Math.sqrt((x2-x1)*(x2-x1)+(y2-y1)*(y2-y1));
return d;
}
}