結果
| 問題 | No.185 和風 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2025-06-22 13:28:58 |
| 言語 | PyPy3 (8.0.0 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 34 ms / 1,000 ms |
| + 333µs | |
| コード長 | 271 bytes |
| 記録 | |
| コンパイル時間 | 380 ms |
| コンパイル使用メモリ | 81,940 KB |
| 実行使用メモリ | 64,112 KB |
| 最終ジャッジ日時 | 2026-10-11 08:34:49 |
| 合計ジャッジ時間 | 1,330 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge4_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 9 |
ソースコード
n=int(input())
ans=None
for i in range(n):
x,y=map(int,input().split())
if ans:
if ans==y-x:
continue
print(-1)
exit()
else:
ans=y-x
if ans>0:
continue
print(-1)
exit()
print(ans)