This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.Scanner; | |
import java.util.stream.Collectors; | |
import java.util.stream.IntStream; | |
public class Main { | |
public static void main(String[] args) { | |
Scanner in = new Scanner(System.in); | |
System.out.println(IntStream.range(Math.max(in.nextInt(), 2), in.nextInt() + 1) | |
.filter(t -> IntStream.range(2, (int) Math.sqrt(t) + 1).noneMatch(d -> t % d == 0)).mapToObj(Integer::toString) | |
.collect(Collectors.joining(" "))); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE resources PUBLIC "-//GlassFish.org//DTD GlassFish Application Server 3.1 Resource Definitions//EN" "http://glassfish.org/dtds/glassfish-resources_1_5.dtd"> | |
<!-- | |
Заполнить данные - см.комментарии | |
--> | |
<resources> | |
<!-- имя пула (заменить poolname), например java:app/db_pool--> | |
<jdbc-connection-pool allow-non-component-callers="false" associate-with-thread="false" | |
connection-creation-retry-attempts="0" connection-creation-retry-interval-in-seconds="10" | |
connection-leak-reclaim="false" connection-leak-timeout-in-seconds="0" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <cstring> | |
#include <windows.h> | |
using namespace std; | |
struct date //создаем еще одну структуру, чтобы вложить ее в структуру building // дата постройки | |
{ | |
char month[4]; // Месяц постройки дома | |
int year; // Год |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#define N 2000 | |
void process(int n); | |
void set0(int k[N]); | |
void set1(int k[N]); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE glassfish-web-app PUBLIC "-//GlassFish.org//DTD GlassFish Application Server 3.1 Servlet 3.0//EN" "http://glassfish.org/dtds/glassfish-web-app_3_0-1.dtd"> | |
<glassfish-web-app error-url=""> | |
<class-loader delegate="true"/> | |
<jsp-config> | |
<property name="keepgenerated" value="true"> | |
<description>Keep a copy of the generated servlet class' java code.</description> | |
</property> | |
</jsp-config> | |
<locale-charset-info default-locale=""> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<persistence version="2.1" xmlns="http://xmlns.jcp.org/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/persistence http://xmlns.jcp.org/xml/ns/persistence/persistence_2_1.xsd"> | |
<persistence-unit name="WebAppPU" transaction-type="JTA"> | |
<jta-data-source>jdbc/library</jta-data-source> | |
<exclude-unlisted-classes>false</exclude-unlisted-classes> | |
<properties> | |
<property name="javax.persistence.schema-generation.database.action" value="create"/> | |
</properties> | |
</persistence-unit> | |
</persistence> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int main() | |
{ | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
using namespace std; | |
int main() { | |
int k, n; | |
cin >> n >> k; | |
int t = n * 2 / k; | |
if (n*2 % k > 0) t++; | |
t *= 2; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package logic; | |
import java.util.*; | |
/** | |
* | |
* @author Eugeny | |
*/ | |
public class Practice { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package lesson6; | |
import java.io.BufferedReader; | |
import java.io.File; | |
import java.io.FileNotFoundException; | |
import java.io.FileReader; | |
import java.io.IOException; | |
import java.io.PrintWriter; | |
import java.util.Scanner; |