didn't solve prob329 yet, but fixed an error...
updating prob329 again...
solved problem 329 :P