problem032 in python