A. Buy the String(思维+贪心)

NoSuchKey