Hiram Finance interview question

Instructions JAVA