Cses Problem Set Subarray In Python