Alternate solution to Putnam B1 2023 problem

This is the B1 problem from 2023 Putnam. You can find official solution here. My solution is not simpler, in fact its unnecessary complex…