QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#745944 | #8250. Magnesium Supplementation | t-aswath | WA | 10ms | 10836kb | Python3 | 634b | 2024-11-14 12:34:36 | 2024-11-14 12:34:38 |
Judging History
answer
import math
def solve():
n, k, p = map(int, input().strip().split())
l, r = 1, k
while l < r:
m = (l + r) // 2
if (m * p) > n:
r = m
else:
l = m + 1
divisors = set()
for i in range(1, int(math.sqrt(n)) + 2):
if n % i == 0:
divisors.add(i)
divisors.add(n // i)
ans = []
for i in divisors:
if i >= l and i <= min(n, k):
ans.append(i)
print(len(ans))
for i in ans:
print(i, end=" ")
if __name__ == "__main__":
t = 1
for i in range(t):
solve()
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 0
Wrong Answer
time: 10ms
memory: 10836kb
input:
6 6 4
output:
3 2 3 6
result:
wrong answer 2nd lines differ - expected: '2', found: '2 3 6 '