RGIS interview question

general counting, simple math problems