https://leetcode.com/problems/pass-the-pillow/



Success (the test case has errors



```python
class Solution:
    def passThePillow(self, n: int, time: int) -> int:
        i = 0
        real_i = 0
        flag = 'increasing'
        record = []
        time += 1
        while True:
            if i == n:
                flag = 'decreasing'
            if i == 0:
                flag = 'increasing'

            if flag == 'increasing':
                i += 1
            if flag == 'decreasing':
                i -= 1
            record.append(i)

            real_i += 1
            if real_i == time:
                break
        
        #print(record)
        return i
```
