結果
| 問題 |
No.185 和風
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2018-11-04 20:46:41 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
AC
|
| 実行時間 | 29 ms / 1,000 ms |
| コード長 | 486 bytes |
| コンパイル時間 | 77 ms |
| コンパイル使用メモリ | 12,544 KB |
| 実行使用メモリ | 10,880 KB |
| 最終ジャッジ日時 | 2024-11-20 20:07:27 |
| 合計ジャッジ時間 | 702 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 7 |
ソースコード
if __name__ == '__main__':
numberList=[]
n=input()
n=int(n)
while n>0:
n-=1
xy=input()
x,y=xy.split(' ')
numberList.append(x)
numberList.append(y)
ans=int(numberList[1])-int(numberList[0])
if ans<=0:
ans=-1
n=2
while len(numberList)>n:
difference=int(numberList[n+1])-int(numberList[n])
if ans!=difference:
ans=-1
break
else:
n+=2
print(ans)