Help with Python

Can anyone help me how to code this problem in Python. I went through the python submissions but when i am trying those codes in my Ubuntu PC they are not working.

My Solution :

You are using Python 3 which does not have any function raw_input. Either use python 2 or use only input():

instead of raw_input() function use only input() or use python 2.7

1 Like