modify problem243.java