Add #47 C solution