結果

問題 No.185 和風
ユーザー 310icecrystal310icecrystal
提出日時 2023-06-23 07:24:58
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 84 ms / 1,000 ms
コード長 151 bytes
コンパイル時間 467 ms
コンパイル使用メモリ 87,012 KB
実行使用メモリ 75,596 KB
最終ジャッジ日時 2023-09-13 02:06:50
合計ジャッジ時間 1,500 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 73 ms
71,396 KB
testcase_01 AC 82 ms
75,324 KB
testcase_02 AC 83 ms
75,516 KB
testcase_03 AC 83 ms
75,508 KB
testcase_04 AC 82 ms
75,524 KB
testcase_05 AC 71 ms
71,492 KB
testcase_06 AC 84 ms
75,596 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

S = set()
for _ in range(int(input())):
    X,Y = map(int,input().split())
    S.add(Y-X)

x = S.pop()
if S or x <= 0:
    print(-1)
else:
    print(x)
0