結果

問題 No.410 出会い
ユーザー yuma_shobon1108yuma_shobon1108
提出日時 2016-12-04 10:19:06
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 502 bytes
コンパイル時間 2,261 ms
コンパイル使用メモリ 71,824 KB
実行使用メモリ 57,844 KB
最終ジャッジ日時 2023-08-18 14:05:49
合計ジャッジ時間 6,896 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
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 146 ms
55,676 KB
testcase_12 AC 148 ms
56,276 KB
testcase_13 AC 146 ms
56,192 KB
testcase_14 AC 149 ms
56,064 KB
testcase_15 AC 149 ms
55,924 KB
testcase_16 AC 147 ms
55,944 KB
testcase_17 AC 146 ms
55,880 KB
testcase_18 AC 148 ms
56,180 KB
testcase_19 AC 151 ms
55,956 KB
testcase_20 AC 150 ms
55,908 KB
testcase_21 WA -
testcase_22 AC 148 ms
56,104 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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);
	}
}
0