結果

問題 No.185 和風
ユーザー lllllll88938494lllllll88938494
提出日時 2023-05-30 20:33:01
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 92 ms / 1,000 ms
コード長 233 bytes
コンパイル時間 292 ms
コンパイル使用メモリ 87,084 KB
実行使用メモリ 75,500 KB
最終ジャッジ日時 2023-08-28 01:05:10
合計ジャッジ時間 1,947 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 74 ms
71,420 KB
testcase_01 AC 92 ms
75,476 KB
testcase_02 AC 73 ms
71,292 KB
testcase_03 AC 73 ms
71,396 KB
testcase_04 AC 86 ms
75,500 KB
testcase_05 AC 73 ms
71,392 KB
testcase_06 AC 84 ms
75,244 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n=int(input())
for i in range(n):
    x,y = map(int,input().split())
    if i == 0:
        t = y-x
        continue
    if y-x != t:
        print(-1)
        exit()

    t = y-x

if t < 1:
    print(-1)
else:
    print(t)
    
    
0