結果

問題 No.306 さいたま2008
ユーザー hhgfhn1hhgfhn1
提出日時 2018-11-18 19:09:38
言語 Java19
(openjdk 21)
結果
AC  
実行時間 111 ms / 2,000 ms
コード長 377 bytes
コンパイル時間 1,685 ms
コンパイル使用メモリ 70,800 KB
実行使用メモリ 56,412 KB
最終ジャッジ日時 2023-08-26 01:58:48
合計ジャッジ時間 5,495 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 105 ms
56,120 KB
testcase_01 AC 106 ms
55,560 KB
testcase_02 AC 106 ms
55,764 KB
testcase_03 AC 102 ms
55,644 KB
testcase_04 AC 103 ms
55,736 KB
testcase_05 AC 103 ms
55,992 KB
testcase_06 AC 105 ms
55,756 KB
testcase_07 AC 102 ms
55,672 KB
testcase_08 AC 106 ms
53,720 KB
testcase_09 AC 107 ms
55,760 KB
testcase_10 AC 109 ms
56,292 KB
testcase_11 AC 106 ms
55,548 KB
testcase_12 AC 105 ms
55,716 KB
testcase_13 AC 108 ms
56,412 KB
testcase_14 AC 107 ms
56,072 KB
testcase_15 AC 111 ms
56,040 KB
testcase_16 AC 104 ms
55,672 KB
testcase_17 AC 108 ms
55,528 KB
testcase_18 AC 103 ms
55,552 KB
testcase_19 AC 104 ms
55,764 KB
testcase_20 AC 104 ms
55,608 KB
testcase_21 AC 106 ms
55,724 KB
testcase_22 AC 105 ms
55,984 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class Main {

	@SuppressWarnings("resource")
	public static void main(String args[]) {
		Scanner scanner = new Scanner(System.in);
		int xa=scanner.nextInt();
		int ya=scanner.nextInt();
		int xb=scanner.nextInt();
		int yb=scanner.nextInt();
		xa*=-1;
		double a=(double)(yb-ya)/(xb-xa);
		double ans=ya-a*xa;
		System.out.println(ans);
	}
}
0