結果
問題 | No.410 出会い |
ユーザー | yuma_shobon1108 |
提出日時 | 2016-12-04 10:19:06 |
言語 | Java21 (openjdk 21) |
結果 |
WA
|
実行時間 | - |
コード長 | 502 bytes |
コンパイル時間 | 2,165 ms |
コンパイル使用メモリ | 78,900 KB |
実行使用メモリ | 42,068 KB |
最終ジャッジ日時 | 2024-05-05 19:16:35 |
合計ジャッジ時間 | 6,348 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | WA | - |
testcase_01 | WA | - |
testcase_02 | WA | - |
testcase_03 | WA | - |
testcase_04 | WA | - |
testcase_05 | WA | - |
testcase_06 | WA | - |
testcase_07 | WA | - |
testcase_08 | WA | - |
testcase_09 | WA | - |
testcase_10 | WA | - |
testcase_11 | AC | 145 ms
41,328 KB |
testcase_12 | AC | 139 ms
41,036 KB |
testcase_13 | AC | 140 ms
41,784 KB |
testcase_14 | AC | 144 ms
41,664 KB |
testcase_15 | AC | 143 ms
41,664 KB |
testcase_16 | AC | 144 ms
41,504 KB |
testcase_17 | AC | 145 ms
41,576 KB |
testcase_18 | AC | 147 ms
41,628 KB |
testcase_19 | AC | 140 ms
41,432 KB |
testcase_20 | AC | 143 ms
41,824 KB |
testcase_21 | WA | - |
testcase_22 | AC | 144 ms
41,432 KB |
ソースコード
import java.util.*; import java.math.*; class Question410 { public static void main(String[] str){ Scanner scan = new Scanner(System.in); double px = scan.nextDouble(), py = scan.nextDouble(); double qx = scan.nextDouble(), qy = scan.nextDouble(); if(px == qx) System.out.println((Math.abs(py)+Math.abs(qy))/2); else if(py == qy) System.out.println((Math.abs(px)+Math.abs(qx))/2); else System.out.println((Math.abs(px)+Math.abs(py)+Math.abs(qx)+Math.abs(qy))/2); } }