/ SeriousOJ /

Record Detail

Time Exceeded


  
# Status Time Cost Memory Cost
#1 Accepted 23ms 3.121 MiB
#2 Accepted 96ms 4.938 MiB
#3 Accepted 109ms 4.816 MiB
#4 Accepted 124ms 4.922 MiB
#5 Accepted 140ms 4.969 MiB
#6 Accepted 171ms 4.797 MiB
#7 Accepted 259ms 5.258 MiB
#8 Accepted 1794ms 9.137 MiB
#9 Accepted 1942ms 12.391 MiB
#10 Accepted 2925ms 12.824 MiB
#11 Accepted 1937ms 12.969 MiB
#12 Accepted 1867ms 12.75 MiB
#13 Accepted 293ms 12.984 MiB
#14 Time Exceeded ≥4074ms ≥12.73 MiB
#15 Time Exceeded ≥4061ms ≥12.91 MiB
#16 Time Exceeded ≥4008ms ≥12.902 MiB
#17 Time Exceeded ≥4044ms ≥4.109 MiB
#18 Time Exceeded ≥4032ms ≥3.566 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-10-03 13:48:34
Judged By
Score
75
Total Time
≥4074ms
Peak Memory
≥12.984 MiB