Invitation to CodeChef October Lunchtime 2019

First subtask seems wrong for kth numbers. My code gives WA if i exit before reading n for 10th testcase and gives SIGABRT if i read n for 10th case?

6 Likes