結果

問題 No.306 さいたま2008
ユーザー kurenaif
提出日時 2016-05-31 18:38:10
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 287 bytes
コンパイル時間 436 ms
コンパイル使用メモリ 61,912 KB
実行使用メモリ 6,820 KB
最終ジャッジ日時 2025-02-14 12:13:14
合計ジャッジ時間 1,454 ms
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 26
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <string>
#include <cstdio>
#include <iomanip>

using namespace std;

int main(void) {
	double xa, xb, ya, yb;
	cout << std::fixed << setprecision(11);
	cin >> xa >> ya >> xb >> yb;
	if (xa * xb > 0) xa *= -1;
	cout << ya - (yb - ya) / (xb - xa)*xa << endl;
}
0