On the Subject of Passport Control

Glory to Arstotzka!

Date

serial number % 3 % 10 Sum % 12 + 1 % 10 % 3 % 10 day (1 if 0) month year

Conditions

ConditionEffect
unlit BOB + lit CAR + PS/2Deny all
lit BOB + lit CAR + lit NSAApprove all
otherwise, deny expired passports and:
Sum of SN digits ≥ 18Approve only people aged ≥ 18
SN contains ≥ 3 occurances of letters in ARSTOTZKAApprove only Arstotzkans
≥ 3 batteries + [parallel + serial]Approve only arrivals
≤ 2 batteries + lit SNDApprove only departures