Runtime Error
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-11-11 03:32:00
- Judged By
- Score
- 20
- Total Time
- 83ms
- Peak Memory
- 4.969 MiB