<commit_before>package homework;

public class Homework3 {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		String[] input = args[0].split("\n");
		for (int i = 0; i < input.length; i++) {
			if (input[i].charAt(0) == 'X') {
				System.out.println(check(Integer.parseInt(input[i].substring(2))));
			}
		}
	}

	private static boolean check(int n) {
		while (n % 2 == 0) {
			n /= 2;
		}
		while (n % 3 == 0) {
			n /= 3;
		}
		while (n % 5 == 0) {
			n /= 5;
		}
		return n == 0 ? true : false;
	}

}<commit_msg>Homework3<commit_after>package homework;

import java.util.HashSet;

public class Homework3 {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		if (args[0].charAt(0) == 'X' || args[0].charAt(0) == 'x') {
			System.out.println(check(Integer.parseInt(args[0].substring(2))));
		} else {
			int index = Integer.parseInt(args[0].substring(2));
			if (index <= 6) {
				System.out.println(index);
			} else {
				HashSet<Integer> sequence = new HashSet<>();
				sequence.add(1);
				sequence.add(2);
				sequence.add(3);
				sequence.add(4);
				sequence.add(5);
				sequence.add(6);
				int i;
				for (i = 7; sequence.size() != index; i++) {
					int tmp = i;
					while (true) {
						if (tmp % 2 == 0) {
							tmp /= 2;
						} else if (tmp % 3 == 0) {
							tmp /= 3;
						} else if (tmp % 5 == 0) {
							tmp /= 5;
						} else {
							break;
						}
						if (sequence.contains(tmp)) {
							sequence.add(i);
							break;
						}
					}
				}
				System.out.println(i - 1);
			}
		}
	}

	private static boolean check(int n) {
		while (n % 2 == 0) {
			n /= 2;
		}
		while (n % 3 == 0) {
			n /= 3;
		}
		while (n % 5 == 0) {
			n /= 5;
		}
		return n == 1 ? true : false;
	}

}
{'fraction_non_alphanumeric': 0.18718094157685763, 'fraction_numerical': 0.030062393647192286, 'mean_word_length': 2.1387900355871885, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3207426', 'n_tokens_mistral': 886, 'n_tokens_neox': 680, 'n_words': 166}