結果

問題 No.410 出会い
ユーザー yuma_shobon1108yuma_shobon1108
提出日時 2016-12-04 10:19:06
言語 Java
(openjdk 23)
結果
WA  
実行時間 -
コード長 502 bytes
コンパイル時間 2,331 ms
コンパイル使用メモリ 73,876 KB
実行使用メモリ 41,680 KB
最終ジャッジ日時 2024-11-27 19:41:28
合計ジャッジ時間 6,829 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 7 WA * 12
権限があれば一括ダウンロードができます

ソースコード

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