pat 1005 solved
PAT 1014