結果

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

ソースコード

diff #

#include <iostream>
#include <iomanip>

using namespace std;

int main()
{
  double x1, y1, x2, y2;
  cin >> x1 >> y1 >> x2 >> y2;

  x1 *= -1;

  const double a = (y1 - y2) / (x1 - x2);
  const double b = y1 - a * x1;

  cout << setprecision( 16 ) << b << endl;  
}
0