結果

問題 No.126 2基のエレベータ
ユーザー chiwakii
提出日時 2015-01-13 23:36:23
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
WA  
実行時間 -
コード長 180 bytes
コンパイル時間 567 ms
コンパイル使用メモリ 58,528 KB
実行使用メモリ 6,948 KB
最終ジャッジ日時 2024-06-22 05:29:38
合計ジャッジ時間 1,405 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1 WA * 2
other AC * 4 WA * 23
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <cmath>

using namespace std;
int main(void)
{
	int A,B,S;
	cin >> A >> B >> S;
	S*=2;
	S-=(abs(S-A)<abs(S-B))?abs(S-A):abs(S-B);
	cout << S << endl;
}
0