結果

問題 No.185 和風
ユーザー Mcpu3
提出日時 2018-04-30 20:40:41
言語 C
(gcc 13.3.0)
結果
WA  
実行時間 -
コード長 258 bytes
コンパイル時間 194 ms
コンパイル使用メモリ 28,416 KB
実行使用メモリ 6,940 KB
最終ジャッジ日時 2024-06-27 23:57:15
合計ジャッジ時間 593 ms
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 6 WA * 1
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <stdio.h>

int main(void)
{
	int n, x, y, i = 0, t = 0;
	scanf("%d", &n);
	for (i; i < n; i++) {
		scanf("%d%d", &x, &y);
		if (i > 0 && t != y - x || x > y) {
			t = -1;
			break;
		}
		t = y - x;
	}
	printf("%d\n", t);
	return 0;
}
0