結果
| 問題 | 
                            No.538 N.G.S.
                             | 
                    
| コンテスト | |
| ユーザー | 
                             torith
                         | 
                    
| 提出日時 | 2017-07-10 11:05:49 | 
| 言語 | C++11(廃止可能性あり)  (gcc 13.3.0)  | 
                    
| 結果 | 
                             
                                WA
                                 
                             
                            
                         | 
                    
| 実行時間 | - | 
| コード長 | 404 bytes | 
| コンパイル時間 | 1,122 ms | 
| コンパイル使用メモリ | 157,144 KB | 
| 実行使用メモリ | 5,248 KB | 
| 最終ジャッジ日時 | 2024-10-07 06:57:42 | 
| 合計ジャッジ時間 | 2,336 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge4 / judge3 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 3 WA * 1 | 
| other | AC * 9 WA * 42 | 
ソースコード
/*
 * 538.cpp
 */
//include files
#include<bits/stdc++.h>
using namespace std;
//DEFINE MACROS
#define MIN(a,b) (a>b?b:a)
#define MAX(a,b) (a>b?a:b)
#define PRINTLN(s) cout << s << endl
//DEFINE CONSTANT
//DEFINE PROTOTYPE
int main(){
  int b1,b2,b3;
  double r,d;
  cin >> b1;
  cin >> b2;
  cin >> b3;
  r = (b3 - b2) / (b2 - b1);
  d = b2 - r * b1;
  cout << b3*r + d << "\n";
  return 0;
}
            
            
            
        
            
torith