結果

問題 No.306 さいたま2008
ユーザー 259_Momone
提出日時 2018-07-05 01:56:42
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 232 bytes
コンパイル時間 1,340 ms
コンパイル使用メモリ 153,876 KB
実行使用メモリ 6,824 KB
最終ジャッジ日時 2025-02-14 12:14:43
合計ジャッジ時間 2,132 ms
ジャッジサーバーID
(参考情報)
judge2 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 26
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.cpp: In function ‘int main()’:
main.cpp:7:10: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
    7 |     scanf("%lld%lld%lld%lld", &X1, &Y1, &X2, &Y2);
      |     ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

ソースコード

diff #

#include<bits/stdc++.h>
using namespace std;

long long X1, Y1, X2, Y2;

int main(){
    scanf("%lld%lld%lld%lld", &X1, &Y1, &X2, &Y2);
    printf("%.12Lf", (static_cast<long double>(X1) * Y2 + X2 * Y1) / (X1 + X2));
    return 0;
}
0