結果
| 問題 | No.185 和風 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2019-10-29 12:18:06 |
| 言語 | Python3 (3.14.7 + numpy 2.5.2 + scipy 1.18.0 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 98 ms / 1,000 ms |
| + 368µs | |
| コード長 | 339 bytes |
| 記録 | |
| コンパイル時間 | 311 ms |
| コンパイル使用メモリ | 21,544 KB |
| 実行使用メモリ | 15,740 KB |
| 最終ジャッジ日時 | 2026-08-27 11:25:14 |
| 合計ジャッジ時間 | 2,259 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 7 |
ソースコード
class Problem0185: def solve(this): n = int(input()) c = True res = set() for i in range(n): x, y = map(int, input().split()) if x >= y: c = False res.add(y - x) if c and len(res) == 1: t = list(res) print(t[0]) else: print(-1) if __name__ == "__main__": problem = Problem0185() problem.solve()