Codes from problem that I come through

Problem-solving attempts