/ SeriousOJ /

Record Detail

Runtime Error


  
# Status Time Cost Memory Cost
#1 Wrong Answer 21ms 3.066 MiB
#2 Runtime Error Traceback (most recent call last): File "foo.py", line 12, in <module> ValueError: min() iterable argument is empty 50ms 4.961 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))+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:40:52
Judged At
2024-11-11 03:32:01
Judged By
Score
0
Total Time
50ms
Peak Memory
4.961 MiB