結果

問題 No.538 N.G.S.
ユーザー rankBBNTrankBBNT
提出日時 2017-07-04 21:59:38
言語 C++11
(gcc 13.3.0)
結果
WA  
実行時間 -
コード長 227 bytes
コンパイル時間 449 ms
コンパイル使用メモリ 55,164 KB
実行使用メモリ 6,824 KB
最終ジャッジ日時 2024-10-05 16:13:19
合計ジャッジ時間 2,157 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 37 WA * 14
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
using namespace std;

int main(void){
    int b1, b2, b3;
    cin >> b1 >> b2 >> b3;
    
    double r, d;
    r = (b3-b2)/(double)(b2-b1);
    d = b2 - r * b1;
    
    cout << (int)(r * b3 + d) << endl;
}
0