I submitted your code as C++ 4.3.2 and it was accepted.
I think while(100) leads to an infinite loop while running.
But when i provided custom input as
it gave me correct answer as
so i feel as u didn’t provide terminating conditioning to it.It keeps on running and leads to a runtime
The terminating condition is the break when 42 is found.
The code has its faults, but it doesn’t give RE on submission.