結果
問題 | No.538 N.G.S. |
ユーザー |
![]() |
提出日時 | 2017-06-30 23:40:29 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 781 bytes |
コンパイル時間 | 590 ms |
コンパイル使用メモリ | 79,460 KB |
実行使用メモリ | 6,948 KB |
最終ジャッジ日時 | 2024-09-24 23:56:29 |
合計ジャッジ時間 | 2,033 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 51 |
ソースコード
#include<string> #include<vector> #include<iostream> #include<cstdio> #include<cstdlib> #include<stack> #include<queue> #include<cmath> #include<algorithm> #include<list> #include<set> #include<map> #include<cstring> #include<sstream> #include<cassert> #define rep(X,Y) for (int (X) = 0;(X) < (Y);++(X)) #define reps(X,S,Y) for (int (X) = S;(X) < (Y);++(X)) #define rrep(X,Y) for (int (X) = (Y)-1;(X) >=0;--(X)) #define repe(X,Y) for ((X) = 0;(X) < (Y);++(X)) #define peat(X,Y) for (;(X) < (Y);++(X)) #define all(X) (X).begin(),(X).end() using namespace std; typedef long long ll; typedef pair<int,int> pii; typedef pair<ll,ll> pll; int main() { ll b1, b2, b3; cin >> b1 >> b2 >> b3; cout << ( (b2 - b3) * (b2 - b3) ) / (b2 - b1) + b3 << endl; return 0; }