help first ever problem

https://www.codechef.com/problems/CHEFSUM

this is my first problem ever in codechef , Can anyone help me to do it , time limit is 1 sec so it will be O(n) or O(n log n) or not above this, I have a O(n^2) approach, will it run ?

1 Like

for x in range(input()):
n=input()
a=map(int,raw_input().split())
print a.index(min(a))+1

https://discuss.codechef.com/questions/110977/detailed-editorial-for-beginners go through this if any problems ask.

1 Like

being your 1st problem , i suspect you have a good idea of time complexity , i guess semesters helped u :stuck_out_tongue:

oh shit , I missed this silly trick . thanks

yes I have a fair bit idea about complexity :stuck_out_tongue: thanks to semesters

u can close this now