a | s | k
5,000000 | 0,000000 | 0,000000
9,000000 | 5,000000 | 1,000000
13,000000 | 14,000000 | 2,000000
17,000000 | 27,000000 | 3,000000
21,000000 | 44,000000 | 4,000000
25,000000 | 65,000000 | 5,000000
29,000000 | 90,000000 | 6,000000
33,000000 | 119,000000 | 7,000000
37,000000 | 152,000000 | 8,000000
41,000000 | 189,000000 | 9,000000
45,000000 | 230,000000 | 10,000000
49,000000 | 275,000000 | 11,000000
53,000000 | 324,000000 | 12,000000
K = 12.0
Язык: Java
import java.math.BigInteger;
import java.util.ArrayList;
import java.util.Scanner;
public class Main {
public static void main(String[] args){
Scanner input = new Scanner(System.in);
int n = input.nextInt();
ArrayList<PointHolder> data = new ArrayList<>();
System.out.println("Init for "+n);
for(int i =0;i<n;i++){
input = new Scanner(System.in);
String inp = input.nextLine();
System.out.println("Got: "+inp);
data.add(new PointHolder(new BigInteger(inp.split(" ")[0]),
new BigInteger(inp.split(" ")[1]),
new BigInteger(inp.split(" ")[2])));
}
for(PointHolder holder:data){
if(canExists(holder)){
System.out.println("Может существовать равнобедренный треугольник со сторонами: "+holder.one + " "+holder.two+" "+holder.three);
public static boolean canExists(PointHolder holder){
if(holder.one.equals(holder.two) || holder.one.equals(holder.three) || holder.two.equals(holder.three)){
long o = holder.one.longValue();
long t = holder.two.longValue();
long th = holder.three.longValue();
return (o<t+th) && (t < o+th) && (th < o+t);
}else{
return false;
class PointHolder{
BigInteger one;
BigInteger two;
BigInteger three;
PointHolder(BigInteger o,BigInteger t,BigInteger th){
one=o;
two=t;
three=th;
a | s | k
5,000000 | 0,000000 | 0,000000
9,000000 | 5,000000 | 1,000000
13,000000 | 14,000000 | 2,000000
17,000000 | 27,000000 | 3,000000
21,000000 | 44,000000 | 4,000000
25,000000 | 65,000000 | 5,000000
29,000000 | 90,000000 | 6,000000
33,000000 | 119,000000 | 7,000000
37,000000 | 152,000000 | 8,000000
41,000000 | 189,000000 | 9,000000
45,000000 | 230,000000 | 10,000000
49,000000 | 275,000000 | 11,000000
53,000000 | 324,000000 | 12,000000
K = 12.0
Язык: Java
import java.math.BigInteger;
import java.util.ArrayList;
import java.util.Scanner;
public class Main {
public static void main(String[] args){
Scanner input = new Scanner(System.in);
int n = input.nextInt();
ArrayList<PointHolder> data = new ArrayList<>();
System.out.println("Init for "+n);
for(int i =0;i<n;i++){
input = new Scanner(System.in);
String inp = input.nextLine();
System.out.println("Got: "+inp);
data.add(new PointHolder(new BigInteger(inp.split(" ")[0]),
new BigInteger(inp.split(" ")[1]),
new BigInteger(inp.split(" ")[2])));
}
for(PointHolder holder:data){
if(canExists(holder)){
System.out.println("Может существовать равнобедренный треугольник со сторонами: "+holder.one + " "+holder.two+" "+holder.three);
}
}
}
public static boolean canExists(PointHolder holder){
if(holder.one.equals(holder.two) || holder.one.equals(holder.three) || holder.two.equals(holder.three)){
long o = holder.one.longValue();
long t = holder.two.longValue();
long th = holder.three.longValue();
return (o<t+th) && (t < o+th) && (th < o+t);
}else{
return false;
}
}
}
class PointHolder{
BigInteger one;
BigInteger two;
BigInteger three;
PointHolder(BigInteger o,BigInteger t,BigInteger th){
one=o;
two=t;
three=th;
}
}