Add #49 C solution