ps1 with problem 1 code complete