結果

問題 No.185 和風
ユーザー zaichu
提出日時 2015-12-18 23:56:34
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
WA  
実行時間 -
コード長 251 bytes
コンパイル時間 460 ms
コンパイル使用メモリ 53,724 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-09-16 08:42:19
合計ジャッジ時間 953 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 4 WA * 3
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
using namespace std;

int main(){
	int n;
	cin >> n;
	int x,y;
	cin >> x >> y;
	int check = y - x;
	for(int i = 0; i < n - 1; i++){
		if(check != y - x) check = -1; break;
	}
	cout << (check < 0 ? -1 : check) << endl;
	return 0;
}
0