Run time error in cyber attack problem

Why am I getting a run time error in this ques?
Here’s my code