/ SeriousOJ /

Record Detail

Runtime Error


  
# Status Time Cost Memory Cost
#1 Accepted 15ms 2.973 MiB
#2 Runtime Error Traceback (most recent call last): File "foo.py", line 12, in <module> ValueError: min() iterable argument is empty 29ms 4.816 MiB
#3 Accepted 42ms 4.977 MiB
#4 Wrong Answer 48ms 4.828 MiB
#5 Accepted 52ms 4.773 MiB
#6 Accepted 72ms 4.887 MiB
#7 Accepted 132ms 5.293 MiB
#8 Accepted 953ms 9.078 MiB
#9 Accepted 971ms 12.414 MiB
#10 Accepted 1109ms 12.77 MiB
#11 Accepted 938ms 12.812 MiB
#12 Accepted 999ms 12.758 MiB
#13 Accepted 139ms 12.797 MiB
#14 Time Exceeded ≥4052ms ≥12.914 MiB
#15 Time Exceeded ≥4073ms ≥12.855 MiB
#16 Time Exceeded ≥4075ms ≥12.816 MiB
#17 Time Exceeded ≥4065ms ≥4.109 MiB
#18 Time Exceeded ≥4054ms ≥3.691 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(2,y+1):
        high=0
        for j in li:
            if j%i==0:
                high+=j
        res.append(high)
    print(res.index(min(res))+2)


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:41:45
Judged At
2024-10-03 13:48:08
Judged By
Score
65
Total Time
4075ms
Peak Memory
12.914 MiB