結果

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

ソースコード

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))?A:(B-A);
	cout << S << endl;
}
0