add get_remain.py powered by array & bitmap