Some programming tests I've encountered with their answers