Problem statement

https://leetcode.com/problems/airplane-seat-assignment-probability/

Solution

Equal to Leetcode 1227. Airplane Seat Assignment Probability.

Complexity

It is O(1) for time and space.

Code

class Solution:
    def solve(self, n):
        return 0.5 if n > 1 else 1