結果
問題 | No.185 和風 |
ユーザー | naoe123 |
提出日時 | 2020-01-14 18:53:57 |
言語 | Python3 (3.12.2 + numpy 1.26.4 + scipy 1.12.0) |
結果 |
AC
|
実行時間 | 18 ms / 1,000 ms |
コード長 | 350 bytes |
コンパイル時間 | 183 ms |
コンパイル使用メモリ | 10,944 KB |
実行使用メモリ | 8,392 KB |
最終ジャッジ日時 | 2023-08-26 23:02:29 |
合計ジャッジ時間 | 957 ms |
ジャッジサーバーID (参考情報) |
judge14 / judge12 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 17 ms
7,800 KB |
testcase_01 | AC | 18 ms
8,256 KB |
testcase_02 | AC | 17 ms
8,392 KB |
testcase_03 | AC | 17 ms
8,352 KB |
testcase_04 | AC | 17 ms
8,328 KB |
testcase_05 | AC | 15 ms
7,816 KB |
testcase_06 | AC | 17 ms
8,248 KB |
ソースコード
N=int(input()) x = [] y = [] for i in range(N): x1,y1=[int(i) for i in input().split()] x.append(x1) y.append(y1) l=[] for i in range(N): l.append(y[i]-x[i]) def multi_diff(es): return es == [es[0]] * len(es) if es else False if multi_diff(l): if l[0]>0: print(l[0]) else: print(-1) else: print(-1)