Amount Interview Question

A quite easy python coding question. not leetcode style