payments. Each record is a string "name,minute,amount,city": who paid, at which minute, how much and in which city.
A payment is suspicious if at least one of these holds:
- its amount is greater than 1000;
- the same person has another payment in a **different** city no more than 60 minutes away from it (exactly 60 counts too).
Return all suspicious records in any order. If an identical record appears in the log several times and is suspicious, it is returned that many times.payments=['ivan,100,300,omsk', 'ivan,150,40,tomsk', 'ivan,300,90,omsk'] → ['ivan,100,300,omsk', 'ivan,150,40,tomsk']
Ivan's first two payments were made in different cities 50 minutes apart, so both are suspicious. The third came 150 minutes after the second and is fine.
payments=['olga,10,1500,kazan', 'petr,20,700,perm'] → ['olga,10,1500,kazan']
1500 is above 1000, so Olga's payment is suspicious on its own. Petr's payment is fine.
payments=['anna,5,100,ufa', 'anna,65,100,sochi', 'boris,30,100,sochi'] → ['anna,5,100,ufa', 'anna,65,100,sochi']
Anna's payments are exactly 60 minutes apart; the boundary counts, so both are suspicious. Boris is a different person and does not affect them.
len(payments) ≤ 1000"name,minute,amount,city"payments=['ivan,100,300,omsk', 'ivan,150,40,tomsk', 'ivan,300,90,omsk']
['ivan,100,300,omsk', 'ivan,150,40,tomsk']
Run checks the first 3 tests in your browser. Submit checks all 81 tests on the server, hidden ones included.