結果
| 問題 | No.185 和風 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2018-11-04 20:46:41 |
| 言語 | Python3 (3.14.3 + numpy 2.4.4 + scipy 1.17.1) |
| 結果 |
AC
|
| 実行時間 | 98 ms / 1,000 ms |
| コード長 | 486 bytes |
| 記録 | |
| コンパイル時間 | 391 ms |
| コンパイル使用メモリ | 20,696 KB |
| 実行使用メモリ | 15,232 KB |
| 最終ジャッジ日時 | 2026-05-14 23:47:54 |
| 合計ジャッジ時間 | 1,874 ms |
|
ジャッジサーバーID (参考情報) |
judge2_1 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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)