It depends on how it scanned. The reason they ask you to write in black pen is because it scans best. You won't fail simply because you wrote in pencil, but if it doesn't scan well and the examiner can't read it, they're not going to go to great lengths to find out what your answer was, given that on the front of the exam paper it says in pretty bold letters that you are to write in black ink.