I am a beginner in Coding and I am trying to solve this question ,
Screenshot of the Question
This is my code
temp = list(map(int, input().s