execution problem

It is not fair at all . Even it is correct code it give an error like “runtime error”. It is not fair

“void main()” should be “int main()”. This should remove any Runtime Error, but you should get a Wrong Answer verdict for your TEST solution. Read the problem statement again to remove the WA verdict.