Problem C only fit for small input

Problem C only fit for small input