Help with Python

help
code
python
syntax

#1

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 : https://www.codechef.com/viewsolution/9181886


#2

You are using Python 3 which does not have any function raw_input. Either use python 2 or use only input(): https://www.codechef.com/viewsolution/9182654


#3

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