結果

問題 No.185 和風
ユーザー minezumuminezumu
提出日時 2018-07-22 09:38:59
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 21 ms / 1,000 ms
コード長 278 bytes
コンパイル時間 93 ms
コンパイル使用メモリ 10,616 KB
実行使用メモリ 7,948 KB
最終ジャッジ日時 2023-08-27 00:49:43
合計ジャッジ時間 847 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 17 ms
7,792 KB
testcase_01 AC 21 ms
7,840 KB
testcase_02 AC 20 ms
7,812 KB
testcase_03 AC 19 ms
7,864 KB
testcase_04 AC 19 ms
7,824 KB
testcase_05 AC 17 ms
7,860 KB
testcase_06 AC 19 ms
7,948 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())
L = []
counter = 0
for i in range(N) :
    X,Y = map(int,input().split())
    Z = Y-X
    if Z > 0 :
        L.append(Z)
    else :
        counter += 1
        L.append(Z)
a = L[0]
b = L.count(a)
if b == N and counter == 0 :
    print(a)
else :
    print(-1)

0