結果

問題 No.538 N.G.S.
ユーザー vrjfsyi
提出日時 2018-05-21 21:11:53
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
WA  
実行時間 -
コード長 469 bytes
コンパイル時間 1,176 ms
コンパイル使用メモリ 71,300 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-06-28 15:35:20
合計ジャッジ時間 2,329 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 40 WA * 11
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <vector>
#include <algorithm>
#include <iterator>
#include <array>
#include <map>
#include <stack>
#include <queue>
#include <set>
#include <cmath>
#include <numeric>

using namespace std;


int main() {

    ios_base::sync_with_stdio(false);
    cin.tie(NULL);

    double b1, b2, b3;
    cin >> b1 >> b2 >> b3;

    double r = (b3 - b2) / (b2 - b1);

    int result = static_cast<int>(b3 + (b3 - b2) * r);

    cout << result << "\n";

}
0