n = int(input())
for i in range(1, n + 1):
if n % i == 0 and i % 3 == 0:
print(i, end=" ")
Copyright © 2025 SCHOLAR.TIPS - All rights reserved.
Answers & Comments
n = int(input())
for i in range(1, n + 1):
if n % i == 0 and i % 3 == 0:
print(i, end=" ")