/ SeriousOJ /

Record Detail

Time Exceeded


  
# Status Time Cost Memory Cost
#1 Accepted 16ms 3.121 MiB
#2 Accepted 45ms 4.824 MiB
#3 Accepted 61ms 4.809 MiB
#4 Accepted 62ms 4.969 MiB
#5 Accepted 70ms 4.914 MiB
#6 Accepted 87ms 4.926 MiB
#7 Accepted 147ms 5.145 MiB
#8 Accepted 979ms 8.922 MiB
#9 Accepted 1061ms 12.438 MiB
#10 Accepted 1030ms 12.816 MiB
#11 Accepted 969ms 12.801 MiB
#12 Accepted 954ms 12.824 MiB
#13 Accepted 167ms 12.898 MiB
#14 Time Exceeded ≥4085ms ≥12.867 MiB
#15 Time Exceeded ≥4093ms ≥12.891 MiB

Code

t=int(input())
for x in range(t):
    n,y=map(int,input().split())
    li=list(map(int,input().split()))
    res=[]
    for i in range(1,y+1):
        high=0
        for j in li:
            if j%i==0:
                high+=j
        res.append(high)
    print(res.index(min(res))+1)


Information

Submit By
Type
Submission
Problem
P1039 Prince Roy, the undisputed ruler of the world
Contest
Brain Booster #3
Language
Python 3 (Python 3.12.3)
Submit At
2024-05-06 17:29:24
Judged At
2024-11-11 03:32:10
Judged By
Score
75
Total Time
≥4093ms
Peak Memory
≥12.898 MiB