Untitled
unknown
plain_text
2 years ago
993 B
5
Indexable
import java.util.Scanner;; public class Main { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); int start = Integer.parseInt(scanner.nextLine()); int end = Integer.parseInt(scanner.nextLine()); int s1 = start / 1000; int s2 = (start / 100) % 10; int s3 = (start / 10) % 10; int s4 = start % 10; int e1 = end / 1000; int e2 = (end / 100) % 10; int e3 = (end / 10) % 10; int e4 = end % 10; for (int i = s1; i <= e1; i++) { for (int j = s2; j <= e2; j++) { for (int k = s3; k <= e3; k++) { for (int l = s4; l <= e4; l++) { if (i % 2 != 0 && j % 2 != 0 && k % 2 != 0 && l % 2 != 0) { System.out.print("" + i + j + k + l + " "); } } } } } } }
Editor is loading...