migration
This commit is contained in:
22
semester-4/ОПJа/lb-1/task1/part1.sh
Executable file
22
semester-4/ОПJа/lb-1/task1/part1.sh
Executable file
@ -0,0 +1,22 @@
|
||||
#!/bin/bash
|
||||
|
||||
ROOT='src/main/java'
|
||||
|
||||
JAVA_FILE="ua/nure/jfn/task1/Part1.java"
|
||||
CLASS_FILE="ua/nure/jfn/task1/Part1.class"
|
||||
|
||||
CLASS="ua.nure.jfn.task1.Part1"
|
||||
|
||||
if [ ! -r "$ROOT/$JAVA_FILE" ]; then
|
||||
echo "File '$ROOT/$JAVA_FILE' is not found or it is not readable." 1>&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
javac "$ROOT/$JAVA_FILE"
|
||||
|
||||
if [ ! -r "$ROOT/$CLASS_FILE" ]; then
|
||||
echo "Can't find '$ROOT/$CLASS_FILE' after compilation." 1>&2
|
||||
exit 2
|
||||
fi
|
||||
|
||||
java -cp "$ROOT" "$CLASS"
|
58
semester-4/ОПJа/lb-1/task1/pom.xml
Normal file
58
semester-4/ОПJа/lb-1/task1/pom.xml
Normal file
@ -0,0 +1,58 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<groupId>ua.nure.jfn</groupId>
|
||||
<artifactId>task1</artifactId>
|
||||
<version>0.0.1-SNAPSHOT</version>
|
||||
|
||||
<properties>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<maven.compiler.release>17</maven.compiler.release>
|
||||
<junit5.version>5.12.0</junit5.version>
|
||||
<surefire.version>3.5.2</surefire.version>
|
||||
<spoon.version>11.2.0</spoon.version>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.junit.jupiter</groupId>
|
||||
<artifactId>junit-jupiter-engine</artifactId>
|
||||
<version>${junit5.version}</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.junit.jupiter</groupId>
|
||||
<artifactId>junit-jupiter-params</artifactId>
|
||||
<version>${junit5.version}</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>fr.inria.gforge.spoon</groupId>
|
||||
<artifactId>spoon-core</artifactId>
|
||||
<version>${spoon.version}</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.slf4j</groupId>
|
||||
<artifactId>slf4j-simple</artifactId>
|
||||
<version>2.0.17</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<finalName>task1</finalName>
|
||||
<pluginManagement>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<artifactId>maven-surefire-plugin</artifactId>
|
||||
<version>${surefire.version}</version>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</pluginManagement>
|
||||
</build>
|
||||
</project>
|
@ -0,0 +1,26 @@
|
||||
package ua.nure.jfn.task1;
|
||||
|
||||
public class Demo {
|
||||
|
||||
private static void printSep(int k) {
|
||||
System.out.printf("%nPart%d =================%n", k);
|
||||
}
|
||||
|
||||
public static void main(String[] args) {
|
||||
printSep(1);
|
||||
Part1.main(new String[] { "A1", "B11 22 C", "D" }); // 34 7
|
||||
|
||||
printSep(2);
|
||||
Part2.main(new String[] { "12", "18", "24" }); // 6 72
|
||||
|
||||
printSep(3);
|
||||
Part3.main(new String[] { "5" }); // 3 5 7 11 13
|
||||
|
||||
printSep(4);
|
||||
Part4.main(new String[] { "360" }); // 360 = 2^3 x 3^2 x 5^1
|
||||
|
||||
printSep(5);
|
||||
Part5.main(new String[] { "1", "5", "3", "0", "5", "2", "1" }); // 5 3 0 5 2 1
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,33 @@
|
||||
package ua.nure.jfn.task1;
|
||||
|
||||
public class Part1 {
|
||||
public static void main(String[] args) {
|
||||
int numbersSum = 0;
|
||||
int digitsSum = 0;
|
||||
|
||||
for (String arg : args) {
|
||||
int digitPlace = 0;
|
||||
char[] chArray = arg.toCharArray();
|
||||
for (int i = chArray.length - 1; i >= 0; i--) {
|
||||
char ch = chArray[i];
|
||||
if (ch >= '0' && ch <= '9') {
|
||||
digitsSum += ch - '0';
|
||||
numbersSum += (ch - '0') * pow(10, digitPlace++);
|
||||
} else {
|
||||
digitPlace = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
System.out.printf("%d %d\n", numbersSum, digitsSum);
|
||||
}
|
||||
|
||||
static int pow(int num, int power) {
|
||||
int result = 1;
|
||||
for (int i = 0; i < power; i++) {
|
||||
result *= num;
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
}
|
@ -0,0 +1,56 @@
|
||||
package ua.nure.jfn.task1;
|
||||
|
||||
public class Part2 {
|
||||
|
||||
static void main(String[] args) {
|
||||
int num = parseInt(args[0]);
|
||||
|
||||
int overallGcd = num;
|
||||
int overallLcm = num;
|
||||
|
||||
for (int i = 1; i < args.length; i++) {
|
||||
num = parseInt(args[i]);
|
||||
overallGcd = gcd(overallGcd, num);
|
||||
overallLcm = lcm(overallLcm, num);
|
||||
}
|
||||
|
||||
System.out.printf("%d %d", overallGcd, overallLcm);
|
||||
}
|
||||
|
||||
static int pow(int num, int power) {
|
||||
int result = 1;
|
||||
for (int i = 0; i < power; i++) {
|
||||
result *= num;
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
static int parseInt(String str) {
|
||||
int number = 0;
|
||||
int digitPlace = 0;
|
||||
char[] chArray = str.toCharArray();
|
||||
|
||||
for (int i = chArray.length - 1; i >= 0; i--) {
|
||||
char ch = chArray[i];
|
||||
if (ch >= '0' && ch <= '9') {
|
||||
number += (ch - '0') * pow(10, digitPlace++);
|
||||
} else {
|
||||
digitPlace = 0;
|
||||
}
|
||||
}
|
||||
|
||||
return number;
|
||||
}
|
||||
|
||||
static int gcd(int a, int b) {
|
||||
for (int min = a < b ? a : b; min > 1; min--)
|
||||
if (a % min == 0 && b % min == 0)
|
||||
return min;
|
||||
return 1;
|
||||
}
|
||||
|
||||
static int lcm(int a, int b) {
|
||||
return (a * b) / gcd(a, b);
|
||||
}
|
||||
}
|
@ -0,0 +1,33 @@
|
||||
package ua.nure.jfn.task1;
|
||||
|
||||
public class Part3 {
|
||||
|
||||
public static void main(String[] args) {
|
||||
for (int n : getPrimeNumbers(Part2.parseInt(args[0])))
|
||||
System.out.printf("%d ", n);
|
||||
}
|
||||
|
||||
public static int[] getPrimeNumbers(int n) {
|
||||
if (n == 0) return new int[0];
|
||||
|
||||
int[] primes = new int[n];
|
||||
primes[0] = 2;
|
||||
|
||||
for (int i = 3, c = 1; c < n; i += 2)
|
||||
if (isPrime(i))
|
||||
primes[c++] = i;
|
||||
|
||||
return primes;
|
||||
}
|
||||
|
||||
public static boolean isPrime(int n) {
|
||||
if (n <= 1)
|
||||
return false;
|
||||
|
||||
for (int i = 2; i * i <= n; i++) // same as i < sqrt(n)
|
||||
if (n % i == 0)
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
@ -0,0 +1,26 @@
|
||||
package ua.nure.jfn.task1;
|
||||
|
||||
public class Part4 {
|
||||
|
||||
public static void main(String[] args) {
|
||||
int num = Part2.parseInt(args[0]);
|
||||
|
||||
System.out.printf("%d = ", num);
|
||||
|
||||
int counter;
|
||||
for (int prime = 2; num != 1; prime = nextPrime(prime)) {
|
||||
for (counter = 0; num % prime == 0; counter++)
|
||||
num /= prime;
|
||||
|
||||
if (counter != 0)
|
||||
System.out.printf("%d^%d%s", prime, counter, num != 1 ? " x " : "");
|
||||
}
|
||||
}
|
||||
|
||||
public static int nextPrime(int x) {
|
||||
for (x += 1; !Part3.isPrime(x); x += 1)
|
||||
;
|
||||
|
||||
return x;
|
||||
}
|
||||
}
|
@ -0,0 +1,49 @@
|
||||
package ua.nure.jfn.task1;
|
||||
|
||||
public class Part5 {
|
||||
|
||||
public static void main(String[] args) {
|
||||
int[] test = { 1, 2, 3, 2, 1, 1, 4, 3, 2, 2, 1 };
|
||||
for (int item : sequence(test)) {
|
||||
System.out.printf("%d ", item);
|
||||
}
|
||||
|
||||
System.out.println();
|
||||
}
|
||||
|
||||
public static int[] sequence(int[] ar) {
|
||||
if (ar == null)
|
||||
return null;
|
||||
|
||||
int n = ar.length;
|
||||
|
||||
int[] seq = new int[n];
|
||||
int count = 0;
|
||||
boolean inSeq = false;
|
||||
|
||||
for (int i = 1; i < n; i++) {
|
||||
int a = ar[i - 1];
|
||||
int b = ar[i];
|
||||
|
||||
if (a > b) {
|
||||
seq[count++] = a;
|
||||
inSeq = true;
|
||||
} else if (inSeq) {
|
||||
seq[count++] = a;
|
||||
inSeq = false;
|
||||
}
|
||||
|
||||
if (i == n - 1 && inSeq)
|
||||
seq[count++] = b;
|
||||
}
|
||||
|
||||
if (count <= 1)
|
||||
return new int[0];
|
||||
|
||||
int[] result = new int[count];
|
||||
for (int i = 0; i < count; i++)
|
||||
result[i] = seq[i];
|
||||
|
||||
return result;
|
||||
}
|
||||
}
|
@ -0,0 +1,16 @@
|
||||
package ua.nure.jfn.task1;
|
||||
|
||||
import org.junit.jupiter.api.Assertions;
|
||||
|
||||
/**
|
||||
* @author Dmytro Kolesnykov
|
||||
*/
|
||||
class Base {
|
||||
|
||||
{
|
||||
if (ComplianceTest.MAKE_ALL_TESTS_FAILED) {
|
||||
Assertions.fail("Compliance tests have not been passed", ComplianceTest.CAUSE);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,123 @@
|
||||
package ua.nure.jfn.task1;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
import static org.junit.jupiter.api.Assertions.fail;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.lang.reflect.Method;
|
||||
import java.lang.reflect.Modifier;
|
||||
import java.net.URISyntaxException;
|
||||
import java.net.URL;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Path;
|
||||
import java.util.List;
|
||||
import java.util.regex.Pattern;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import org.junit.jupiter.api.Disabled;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import spoon.Launcher;
|
||||
import spoon.SpoonAPI;
|
||||
import spoon.reflect.declaration.CtType;
|
||||
import spoon.reflect.reference.CtTypeReference;
|
||||
import spoon.reflect.visitor.filter.TypeFilter;
|
||||
|
||||
/**
|
||||
* @author Dmytro Kolesnykov
|
||||
*/
|
||||
@Disabled("This test is used as a trigger to fail all the other tests")
|
||||
class ComplianceTest {
|
||||
|
||||
// Assign the following option to false to skip the compliance test
|
||||
// note, during testing at the stand this option will be turned on!!!
|
||||
|
||||
//private static final boolean TURN_TEST_COMPLIANCE_ON = false;
|
||||
private static final boolean TURN_TEST_COMPLIANCE_ON = true;
|
||||
|
||||
public static final boolean MAKE_ALL_TESTS_FAILED;
|
||||
|
||||
public static final Throwable CAUSE;
|
||||
|
||||
private static final Object EOL = System.lineSeparator();
|
||||
|
||||
static {
|
||||
L: {
|
||||
try {
|
||||
if (TURN_TEST_COMPLIANCE_ON) {
|
||||
initSpoon();
|
||||
startCompianceTests();
|
||||
}
|
||||
} catch (ReflectiveOperationException ex) {
|
||||
MAKE_ALL_TESTS_FAILED = true;
|
||||
CAUSE = ex.getCause();
|
||||
break L;
|
||||
}
|
||||
MAKE_ALL_TESTS_FAILED = false;
|
||||
CAUSE = null;
|
||||
}
|
||||
}
|
||||
|
||||
private static SpoonAPI spoon;
|
||||
|
||||
private static void initSpoon() {
|
||||
spoon = new Launcher();
|
||||
spoon.addInputResource("src/main/java/");
|
||||
spoon.buildModel();
|
||||
}
|
||||
|
||||
private static void startCompianceTests() throws ReflectiveOperationException {
|
||||
ComplianceTest cTest = new ComplianceTest();
|
||||
for (Method m : ComplianceTest.class.getDeclaredMethods()) {
|
||||
if (Modifier.isPrivate(m.getModifiers())) {
|
||||
continue;
|
||||
}
|
||||
Test[] ar = m.getAnnotationsByType(Test.class);
|
||||
if (ar.length > 0 && m.getAnnotationsByType(Test.class)[0] != null) {
|
||||
m.invoke(cTest);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////
|
||||
|
||||
@Test
|
||||
void appShouldNotUseForbiddenAPI() throws IOException, URISyntaxException {
|
||||
URL url = getClass().getResource("forbidden-api-regex.txt");
|
||||
String regex = Files.readString(Path.of(url.toURI()));
|
||||
Pattern forbiddenAPIRegex = Pattern.compile(regex.toString());
|
||||
StringBuilder errorMessage = new StringBuilder();
|
||||
for (CtType<?> ctType : spoon.getModel().getAllTypes()) {
|
||||
List<String> forbiddenAPI = ctType.getElements(new TypeFilter<>(CtTypeReference.class))
|
||||
.stream()
|
||||
.distinct()
|
||||
.filter(r -> forbiddenAPIRegex.matcher(r.toString()).matches())
|
||||
.map(CtTypeReference::getQualifiedName)
|
||||
.toList();
|
||||
if (!forbiddenAPI.isEmpty()) {
|
||||
errorMessage.append(EOL)
|
||||
.append(ctType.getQualifiedName()).append(": ")
|
||||
.append(forbiddenAPI);
|
||||
}
|
||||
}
|
||||
if (!errorMessage.isEmpty()) {
|
||||
fail(() -> "Using of this API is forbidden: " + errorMessage);
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
void shouldBeAppropriateNumberOfPackagesAndClasses() throws IOException, URISyntaxException {
|
||||
URL url = getClass().getResource("list-of-types.txt");
|
||||
String expected = Files.readString(Path.of(url.toURI())).trim();
|
||||
// '\n' character is used for clarity in error message
|
||||
String actual = spoon.getModel().getAllPackages().stream()
|
||||
.filter(p -> p.getTypes().size() != 0)
|
||||
.map(p -> p.getTypes().stream()
|
||||
.map(CtType::getQualifiedName)
|
||||
.sorted()
|
||||
.collect(Collectors.joining("\n")))
|
||||
.collect(Collectors.joining("\n"));
|
||||
assertEquals('\n' + expected, '\n' + actual);
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,39 @@
|
||||
package ua.nure.jfn.task1;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
|
||||
import java.io.ByteArrayOutputStream;
|
||||
import java.io.PrintStream;
|
||||
|
||||
import org.junit.jupiter.params.ParameterizedTest;
|
||||
import org.junit.jupiter.params.provider.CsvFileSource;
|
||||
|
||||
/**
|
||||
* @author Dmytro Kolesnykov
|
||||
*/
|
||||
class Part1Test extends Base {
|
||||
|
||||
private static final PrintStream STD_OUT = System.out;
|
||||
|
||||
private static final String[] EMPTY = {};
|
||||
|
||||
@ParameterizedTest
|
||||
@CsvFileSource(delimiter = ';', resources = "part1.csv")
|
||||
void test(String input, String expected) {
|
||||
String[] args = input == null ? EMPTY : input.split("\\s+");
|
||||
if (expected == null) {
|
||||
expected = "";
|
||||
}
|
||||
ByteArrayOutputStream baos = new ByteArrayOutputStream();
|
||||
PrintStream ps = new PrintStream(baos);
|
||||
try {
|
||||
System.setOut(ps);
|
||||
Part1.main(args);
|
||||
} finally {
|
||||
System.setOut(STD_OUT);
|
||||
}
|
||||
assertEquals(expected, baos.toString().trim());
|
||||
ps.close();
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,42 @@
|
||||
package ua.nure.jfn.task1;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
|
||||
import java.io.ByteArrayOutputStream;
|
||||
import java.io.PrintStream;
|
||||
|
||||
import org.junit.jupiter.params.ParameterizedTest;
|
||||
import org.junit.jupiter.params.provider.CsvFileSource;
|
||||
|
||||
/**
|
||||
* @author Dmytro Kolesnykov
|
||||
*/
|
||||
class Part2Test extends Base {
|
||||
|
||||
private static final PrintStream STD_OUT = System.out;
|
||||
|
||||
private static final String[] EMPTY = {};
|
||||
|
||||
@ParameterizedTest
|
||||
@CsvFileSource(delimiter = ';', resources = "part2.csv")
|
||||
void test(String input, String expected) {
|
||||
String[] args;
|
||||
expected = expected == null ? "" : expected.replaceAll("_", " ");
|
||||
args = input == null ? EMPTY : input.split("\\s+");
|
||||
for (int j = 0; j < args.length; ++j) {
|
||||
args[j] = args[j].replace("_", " ");
|
||||
}
|
||||
ByteArrayOutputStream baos = new ByteArrayOutputStream();
|
||||
PrintStream ps = new PrintStream(baos);
|
||||
try {
|
||||
System.setOut(ps);
|
||||
Part2.main(args);
|
||||
} finally {
|
||||
System.setOut(STD_OUT);
|
||||
}
|
||||
String actual = baos.toString();
|
||||
assertEquals(expected, actual);
|
||||
ps.close();
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,36 @@
|
||||
package ua.nure.jfn.task1;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
|
||||
import java.io.ByteArrayOutputStream;
|
||||
import java.io.PrintStream;
|
||||
|
||||
import org.junit.jupiter.params.ParameterizedTest;
|
||||
import org.junit.jupiter.params.provider.CsvFileSource;
|
||||
|
||||
/**
|
||||
* @author Dmytro Kolesnykov
|
||||
*/
|
||||
class Part3Test extends Base {
|
||||
|
||||
private static final PrintStream STD_OUT = System.out;
|
||||
|
||||
@ParameterizedTest
|
||||
@CsvFileSource(delimiter = ';', resources = "part3.csv")
|
||||
void test(String input, String expected) {
|
||||
if (expected == null) {
|
||||
expected = "";
|
||||
}
|
||||
ByteArrayOutputStream baos = new ByteArrayOutputStream();
|
||||
PrintStream ps = new PrintStream(baos);
|
||||
try {
|
||||
System.setOut(ps);
|
||||
Part3.main(new String[] { input });
|
||||
} finally {
|
||||
System.setOut(STD_OUT);
|
||||
}
|
||||
assertEquals(expected, baos.toString().trim());
|
||||
ps.close();
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,33 @@
|
||||
package ua.nure.jfn.task1;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
|
||||
import java.io.ByteArrayOutputStream;
|
||||
import java.io.PrintStream;
|
||||
|
||||
import org.junit.jupiter.params.ParameterizedTest;
|
||||
import org.junit.jupiter.params.provider.CsvFileSource;
|
||||
|
||||
/**
|
||||
* @author Dmytro Kolesnykov
|
||||
*/
|
||||
class Part4Test extends Base {
|
||||
|
||||
private static final PrintStream STD_OUT = System.out;
|
||||
|
||||
@ParameterizedTest
|
||||
@CsvFileSource(delimiter = ';', resources = "part4.csv")
|
||||
void test(String input, String expected) {
|
||||
ByteArrayOutputStream baos = new ByteArrayOutputStream();
|
||||
PrintStream ps = new PrintStream(baos);
|
||||
try {
|
||||
System.setOut(ps);
|
||||
Part4.main(new String[] { input });
|
||||
} finally {
|
||||
System.setOut(STD_OUT);
|
||||
}
|
||||
assertEquals(expected, baos.toString().trim());
|
||||
ps.close();
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,43 @@
|
||||
package ua.nure.jfn.task1;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.stream.Collectors;
|
||||
import java.util.stream.IntStream;
|
||||
|
||||
import org.junit.jupiter.params.ParameterizedTest;
|
||||
import org.junit.jupiter.params.provider.CsvFileSource;
|
||||
|
||||
/**
|
||||
* @author Dmytro Kolesnykov
|
||||
*/
|
||||
class Part5Test extends Base {
|
||||
|
||||
@ParameterizedTest
|
||||
@CsvFileSource(delimiter = ';', resources = "part5.csv")
|
||||
void test(String input, String expected) {
|
||||
if (expected != null) {
|
||||
if ("_".equals(expected)) {
|
||||
expected = "";
|
||||
} else {
|
||||
expected = expected.replaceAll("\\s+", " ");
|
||||
}
|
||||
}
|
||||
int[] ar = null;
|
||||
if (input != null) {
|
||||
ar = Arrays.stream(input.split("\\s+")).mapToInt(Integer::parseInt).toArray();
|
||||
}
|
||||
int[] result = Part5.sequence(ar);
|
||||
String actual;
|
||||
if (result == null) {
|
||||
actual = null;
|
||||
} else {
|
||||
actual = IntStream.of(result)
|
||||
.mapToObj(String::valueOf)
|
||||
.collect(Collectors.joining(" "));
|
||||
}
|
||||
assertEquals(expected, actual);
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,6 @@
|
||||
(?x)
|
||||
^
|
||||
(java\.(util|math)\.\S+)
|
||||
|
|
||||
(java\.lang\.(Byte|Short|Integer|Long|Character|Float|Double))
|
||||
$
|
@ -0,0 +1,6 @@
|
||||
ua.nure.jfn.task1.Demo
|
||||
ua.nure.jfn.task1.Part1
|
||||
ua.nure.jfn.task1.Part2
|
||||
ua.nure.jfn.task1.Part3
|
||||
ua.nure.jfn.task1.Part4
|
||||
ua.nure.jfn.task1.Part5
|
@ -0,0 +1,35 @@
|
||||
P4 R8 40 1 ; 53 17
|
||||
x6vp 45 3 ; 54 18
|
||||
5 wQ8M 9 16 ; 38 29
|
||||
77ksvZg ; 77 14
|
||||
z5189185 ; 5189185 37
|
||||
10X H21b ; 31 4
|
||||
9w6q4U4 P0b ; 23 23
|
||||
43 cy01 ; 44 8
|
||||
Z Q8 C d 5r7n53 ; 73 28
|
||||
428 C1D ; 429 15
|
||||
N 6k81 97 A 204 ; 388 37
|
||||
98aPwh m 3146S13k ; 3257 35
|
||||
3 Ngf ; 3 3
|
||||
W2 9U9pPy ; 20 20
|
||||
761 5u ; 766 19
|
||||
2b Z ; 2 2
|
||||
4r1662 bEfN5Z9BV93 ; 1773 45
|
||||
56 q 48 ; 104 23
|
||||
ph 5 ; 5 5
|
||||
5p 53A81t r ; 139 22
|
||||
5eg E ; 5 5
|
||||
054t716 ; 770 23
|
||||
23yh 0X83 6RT3 x0YV ; 115 25
|
||||
2R0 7m1 17Kz5 qX7 ; 39 30
|
||||
M6 YA6 7 0419f2 ; 440 35
|
||||
xU68M D rq 81 0 42 ; 191 29
|
||||
zSZR2r6M ; 8 8
|
||||
4M2 epBT3 A6 2832 ; 2847 30
|
||||
z38G0 H 565a ; 603 27
|
||||
s 1V 4S 6M z8 ; 19 19
|
||||
7AG 70 3 ; 80 17
|
||||
0 u34 1rcvN 1 2 ; 38 11
|
||||
5 rC86E2H753m4 ; 850 40
|
||||
56 825R ; 881 26
|
||||
FzV 1 2 H ; 3 3
|
|
@ -0,0 +1,35 @@
|
||||
18 9 ; 9 18
|
||||
1 1 14 ; 1 14
|
||||
12 6 ; 6 12
|
||||
12 20 ; 4 60
|
||||
10 16 ; 2 80
|
||||
1 1 25 5 ; 1 25
|
||||
12 24 ; 12 24
|
||||
14 ; 14 14
|
||||
11 ; 11 11
|
||||
21 28 ; 7 84
|
||||
21 14 ; 7 42
|
||||
24 16 ; 8 48
|
||||
12 30 6 ; 6 60
|
||||
10 15 ; 5 30
|
||||
27 9 ; 9 27
|
||||
16 ; 16 16
|
||||
16 8 ; 8 16
|
||||
12 ; 12 12
|
||||
16 24 ; 8 48
|
||||
12 8 4 ; 4 24
|
||||
12 16 ; 4 48
|
||||
10 30 5 25 ; 5 150
|
||||
14 21 ; 7 42
|
||||
13 26 ; 13 26
|
||||
12 3 15 6 ; 3 60
|
||||
9 18 ; 9 18
|
||||
1 1 11 ; 1 11
|
||||
10 5 15 ; 5 30
|
||||
10 16 4 6 ; 2 240
|
||||
10 20 5 ; 5 20
|
||||
8 16 8 ; 8 16
|
||||
20 10 ; 10 20
|
||||
13 ; 13 13
|
||||
8 ; 8 8
|
||||
18 9 27 ; 9 54
|
|
@ -0,0 +1,20 @@
|
||||
8 ; 2 3 5 7 11 13 17 19
|
||||
17 ; 2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59
|
||||
33 ; 2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 83 89 97 101 103 107 109 113 127 131 137
|
||||
16 ; 2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53
|
||||
2 ; 2 3
|
||||
24 ; 2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 83 89
|
||||
26 ; 2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 83 89 97 101
|
||||
7 ; 2 3 5 7 11 13 17
|
||||
22 ; 2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79
|
||||
15 ; 2 3 5 7 11 13 17 19 23 29 31 37 41 43 47
|
||||
14 ; 2 3 5 7 11 13 17 19 23 29 31 37 41 43
|
||||
28 ; 2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 83 89 97 101 103 107
|
||||
13 ; 2 3 5 7 11 13 17 19 23 29 31 37 41
|
||||
10 ; 2 3 5 7 11 13 17 19 23 29
|
||||
19 ; 2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67
|
||||
38 ; 2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 83 89 97 101 103 107 109 113 127 131 137 139 149 151 157 163
|
||||
30 ; 2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 83 89 97 101 103 107 109 113
|
||||
6 ; 2 3 5 7 11 13
|
||||
12 ; 2 3 5 7 11 13 17 19 23 29 31 37
|
||||
1 ; 2
|
|
@ -0,0 +1,28 @@
|
||||
111 ; 111 = 3^1 x 37^1
|
||||
313 ; 313 = 313^1
|
||||
658 ; 658 = 2^1 x 7^1 x 47^1
|
||||
5 ; 5 = 5^1
|
||||
943 ; 943 = 23^1 x 41^1
|
||||
550 ; 550 = 2^1 x 5^2 x 11^1
|
||||
596 ; 596 = 2^2 x 149^1
|
||||
439 ; 439 = 439^1
|
||||
523 ; 523 = 523^1
|
||||
93 ; 93 = 3^1 x 31^1
|
||||
550 ; 550 = 2^1 x 5^2 x 11^1
|
||||
596 ; 596 = 2^2 x 149^1
|
||||
363 ; 363 = 3^1 x 11^2
|
||||
852 ; 852 = 2^2 x 3^1 x 71^1
|
||||
996 ; 996 = 2^2 x 3^1 x 83^1
|
||||
708 ; 708 = 2^2 x 3^1 x 59^1
|
||||
369 ; 369 = 3^2 x 41^1
|
||||
747 ; 747 = 3^2 x 83^1
|
||||
735 ; 735 = 3^1 x 5^1 x 7^2
|
||||
360 ; 360 = 2^3 x 3^2 x 5^1
|
||||
783 ; 783 = 3^3 x 29^1
|
||||
648 ; 648 = 2^3 x 3^4
|
||||
360 ; 360 = 2^3 x 3^2 x 5^1
|
||||
594 ; 594 = 2^1 x 3^3 x 11^1
|
||||
500 ; 500 = 2^2 x 5^3
|
||||
540 ; 540 = 2^2 x 3^3 x 5^1
|
||||
904 ; 904 = 2^3 x 113^1
|
||||
936 ; 936 = 2^3 x 3^2 x 13^1
|
|
@ -0,0 +1,24 @@
|
||||
1 2 3 2 1 1 4 ; 3 2 1
|
||||
;
|
||||
1 2 3 2 1 1 4 3 2 2 1 ; 3 2 1 4 3 2 2 1
|
||||
1 2 3 4 5 ; _
|
||||
1 2 3 4 5 4 ; 5 4
|
||||
1 2 1 4 1 4 1 ; 2 1 4 1 4 1
|
||||
5 2 1 4 1 4 5 ; 5 2 1 4 1
|
||||
3 2 1 3 2 1 3 2 1 ; 3 2 1 3 2 1 3 2 1
|
||||
1 2 6 2 6 4 7 8 7 8 8 1 6 8 5 8 5 2 ; 6 2 6 4 8 7 8 1 8 5 8 5 2
|
||||
6 4 5 8 2 4 8 2 2 5 ; 6 4 8 2 8 2
|
||||
1 1 1 7 4 7 8 7 3 7 7 4 5 8 8 3 ; 7 4 8 7 3 7 4 8 3
|
||||
4 1 6 2 8 6 2 5 ; 4 1 6 2 8 6 2
|
||||
5 1 6 5 4 5 1 2 2 5 5 8 ; 5 1 6 5 4 5 1
|
||||
1 2 1 6 2 8 ; 2 1 6 2
|
||||
6 1 7 1 2 5 4 4 4 7 7 3 6 6 8 ; 6 1 7 1 5 4 7 3
|
||||
8 6 5 5 8 8 7 3 4 3 5 3 5 ; 8 6 5 8 7 3 4 3 5 3
|
||||
2 7 2 2 3 2 8 2 6 ; 7 2 3 2 8 2
|
||||
1 1 8 8 6 8 1 4 4 7 1 7 1 ; 8 6 8 1 7 1 7 1
|
||||
4 2 4 1 7 6 3 7 1 2 1 1 4 2 3 ; 4 2 4 1 7 6 3 7 1 2 1 4 2
|
||||
8 2 2 8 1 3 8 3 3 5 4 ; 8 2 8 1 8 3 5 4
|
||||
1 6 4 5 7 6 7 3 3 8 4 4 5 1 8 3 8 7 ; 6 4 7 6 7 3 8 4 5 1 8 3 8 7
|
||||
6 6 8 7 1 6 6 2 6 6 ; 8 7 1 6 2
|
||||
5 6 2 3 7 3 2 4 4 2 ; 6 2 7 3 2 4 2
|
||||
5 2 4 8 7 5 2 2 5 7 1 ; 5 2 8 7 5 2 7 1
|
|
Reference in New Issue
Block a user