Happen Bank interview question

very basic question with some unnecessary tweaks.