/ SeriousOJ /

Record Detail

Time Exceeded


  
# Status Time Cost Memory Cost
#1 Time Exceeded ≥1095ms ≥3.449 MiB

Code

def ctdv(num):
        c = 0
        for i in range(1,n+1):
            if num % i == 0:
                c += 1
        return c 
    
def srt_by_d_v(x):
    return (ctdv(x), -x)


for _ in range(int(input())):
    n = int(input())
    l = list(map(int, input().split()))
    k = int(input())
    
    sort_arr = sorted(l , key = srt_by_d_v)  #key hishebe 2 ta jinish nibe, age count then -value,borota age ashbe karon -borota list a age dibe
    
    #print(sort_arr)
    print(sort_arr[k-1])

Information

Submit By
Type
Submission
Problem
P1008 Ordering Number
Language
Python 3 (Python 3.12.3)
Submit At
2024-01-08 18:29:07
Judged At
2024-11-11 03:43:40
Judged By
Score
0
Total Time
≥1095ms
Peak Memory
≥3.449 MiB