Untitled

 avatar
unknown
java
a year ago
374 B
6
Indexable
import java.util.Scanner;

public class P1 {
	public static void Sol(int n) {
		for (int i = 1; i <= n; i += 2) {
			if (n % i == 0) {
				System.out.print(i + " ");

			}
		}
	}

//	6 = 1, 2, 3, 6

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

		int n = sc.nextInt();

//		System.out.println(Sol(n));
		Sol(n);
	}
}
Editor is loading...
Leave a Comment