結果

問題 No.185 和風
ユーザー Luoto-greenLuoto-green
提出日時 2017-07-07 12:06:22
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 206 bytes
コンパイル時間 111 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 10,880 KB
最終ジャッジ日時 2024-04-16 01:13:23
合計ジャッジ時間 788 ms
ジャッジサーバーID
(参考情報)
judge4 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 33 ms
10,752 KB
testcase_01 AC 36 ms
10,752 KB
testcase_02 AC 35 ms
10,880 KB
testcase_03 AC 32 ms
10,880 KB
testcase_04 AC 33 ms
10,880 KB
testcase_05 WA -
testcase_06 AC 32 ms
10,880 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())
x,y = map(int,input().split())
c = y-x
cou = 1
for i in range(n-1):
    x,y = map(int,input().split())
    if y-x == c:
        cou += 1
if n != cou or x>y:
    print(-1)
else:
    print(c)
0