pat advanced level , id: 1065

http://pat.zju.edu.cn/contests/pat-a-practise/1065