add programs for "ticket gobble" problem