Python editorial solution


#1

python editorial fastest solution violates the constraints in the problem!