Note sure that circuit will work or not. Also your voltage divider uses equal size resistors, so it cuts voltage in half, so 24vdc = 12vdc, which is still higher then the maximum allowed input voltage to a input pin, +5.5vdc?
I would change the lower resistor size and then first measure the voltage that the arduino pin will see in each switch state with a digital multimeter before wiring it to arduino pin. Again the arduino pin must 'see' less then 5.5vdc to be safe.
Lefty