結果
| 問題 | No.185 和風 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2019-10-29 12:18:06 |
| 言語 | Python3 (3.15.2 + numpy 2.5.4 + scipy 1.18.1 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 18 ms / 1,000 ms |
| + 232µs | |
| コード長 | 339 bytes |
| 記録 | |
| コンパイル時間 | 52 ms |
| コンパイル使用メモリ | 14,720 KB |
| 実行使用メモリ | 10,240 KB |
| 最終ジャッジ日時 | 2026-11-12 13:39:27 |
| 合計ジャッジ時間 | 1,481 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge5_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 10 |
ソースコード
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()