Данный отчёт сгенерирован 10.02.2023 18:21:31 UTC.
HTML версия (этот сайт) сгенерирован 10.02.2023 18:21:38 UTC.
Коммит: [bfeb65b9] add automatic zip creation 10.02.2023 18:21:31
HTML версия (этот сайт) сгенерирован 10.02.2023 18:21:38 UTC.
Коммит: [bfeb65b9] add automatic zip creation 10.02.2023 18:21:31
Задача: Чи арифметична прогресія
10.02.2023 18:21:31
Описание: Дано три числа. Визначити, чи можна їх розташувати так, щоб вийшла арифметична прогресія.
Для цього оголосіть функцію progress(a, b, c), яка отримує три числа та повертає true або false.
10.02.2023 18:21:31
Решений: 109
10.02.2023 18:21:31
Чи арифметична прогресія
10.02.2023 18:21:31
function progress(a, b, c){
let arrToSort = [a, b, c];
arrToSort.sort((x,y)=> x-y);
return arrToSort[2] - arrToSort[1] == arrToSort[1] - arrToSort[0];
}
function progress(a, b, c){
if (b-a == c-b || a-b == c-a || a-c == b-a){
return true
}
return false
}
function progress(a, b, c) {
let arr = [a, b, c];
arr.sort();
if(arr[2]-arr[1]==arr[1]-arr[0])
return true;
else
return false;
}
function progress(...nums){
nums.sort((a, b) => a - b);
return ( nums[0] - nums[1] == nums[1] - nums[2])? true:false
}
function progress(a,b,c){
let arr = [a,b,c].sort();
return b - a == c - b;
}
function progress(a, b, c){
let arr = [a, b, c];
arr.sort();
if(arr[0]-arr[1]==arr[1]-arr[2])
return true;
return false;
}
function progress(a, b, c){
if(a-b == b-c || a-c == c-b||b-a == c-b || c-a == b-c){return true}
else{return false}
}
function progress(a,b,c){
let k = Math.min(a,b,c)
let h = Math.max(a,b,c)
let s;
if(k!==a & h!==a) s = a
else if(k!==b & h!==b) s = b
else s = c
return (h-s)==(s-k)
}
function progress(a,b,c){
if(a-b==b-c||c-b==b-a||a-c==c-b||c-a==a-b||b-a==a-c||b-c==c-a){return true}
else{return false;}
}
function progress(a,b,c){
let arr = [a,b,c]
let result = false;
let diff = arr[1]-arr[0]
for (let i = 0; i< arr.length-1;i++){
if (arr[i+1]-arr[i] == diff){
result = true
}
else{
return false
}
}
return result
}
function progress(a,b,c){
myar = [a,b,c]
myar.sort(function(a,b){return a-b})
dif = myar[1]-myar[0]
if(myar[0]+dif == myar[1] && myar[1]+dif == myar[2]){
return true
} else return false
}
function progress(a, b, c) {
let arr = [a, b, c].sort()
if (arr[1] - arr[0] == arr[2] - arr[1]) return true
else return false
}
function progress(a, b, c) {
let m = [a, b, c];
m.sort();
return m[1] - m[0] == m[2] - m[1];
}
function progress(a, b, c) {
let arry = [a,b,c];
arry.sort();
if (Math.abs(arry[0]-arry[1]) == Math.abs(arry[1]-arry[2])) return true;
else return false;
}
function progress(a, b, c) {
let m = [a, b, c];
m.sort(com);
return m[1] - m[0] == m[2] - m[1]
}
function com(x, y){
return x - y;
}
function progress(a,b,c) {
return b == a +(b-a) && c == a + (b-a) * 2;
}
function progress(a, b, c)
{
function compare (x,y)
{
return x-y;
}
let arr = [a, b, c];
let result = false;
arr.sort(compare);
let d = arr[1] - arr[0];
for(let i = 2; i < arr.length; i++)
{
if(arr[i-1] + d == arr[i])
{
result = true;
}
else
{
result = false;
}
}
return result;
}
function progress(a, b, c){
if ((c-b==b-a)||(b-c==c-a)||(a-b==b-c)||(c-a==a-b)||(b-a==a-c)||(a-c==c-b)){
return true;
}
else
return false;
}
function progress(a, b, c) {
return ((b-a==c-b||c-a==b-c||a-b==c-a)) ? true : false;
}
function progress(a, b, c) {
let array = [a, b, c].sort();
return array[2] - array[1] === array[1] - array[0];
}
function progress(a, b, c){
if (b - a == c - b)
return true
else
return false
}
function progress(a, b, c) {
let arr = [a, b, c];
arr.sort();
let d = arr[1] - arr[0];
let result = (arr[2] - arr[1] == d) ? true : false;
return result;
}
function progress(a,b,c)
{
let arr = [a,b,c].sort((a, b) => a - b);
if(arr[0] - arr[1] == arr[1] - arr[2])
return true
return false
}
function progress(a, b, c) {
let q = ((Math.max(a,b,c) + Math.min(a,b,c)) / 2)
if((Math.max(a,b,c)) - (Math.min(a,b,c)) == q) {
return true;
} else {return false}
}
function progress(a,b,c){
return (a-b==b-c) || (c-a==a-b)
}
function progress(a,b,c){
if(a-b == b-c || b - a == a - c || c - b == b - a || a - c == c - b || c - a == a - b || b - c == c - a){
return true
}else{
return false
}
}
function progress(...args){
let max = args.splice(args.indexOf(Math.max(args[0], args[1], args[2])), 1);
let min = args.splice(args.indexOf(Math.min(args[0], args[1])), 1);
if (max - args[0] === args[0] - min) return true;
return false;
}
function progress(a,b,c){
const arr_of_num = [a, b, c];
if(a==b||a==c||b==c){
return false
}
else if(arr_of_num.indexOf(Math.max(a, b, c) - Math.min(a, b, c))!=-1){
return true
}
else{
return false
}
}
function progress(a, b, c) {
if (a == undefined || b == undefined || c == undefined) {
return false;
}
if (a + c == 2 * b || b + a == 2 * c || c + b == 2 * a) {
return true;
}
return false;
}
function progress(z, x, c) {
let zxc = [z, x, c];
zxc.sort();
return zxc[1] - zxc[0] == zxc[2] -zxc[1];
}
function progress(a,b,c) {
return a - b == b - c
}
function progress(a, b, c){
d = b - a;
return b + d == c;
}
function progress(a, b, c){
return a-b == b-c || a-c == c-b || b-a == a-c || b-c == c-a || c-a == a-b || c-b == b-a
}
function progress (a, b, c){
let result = true;
if (b-a == c-b || a-b == c-a || a-c == b-a){
result = true;
}
else{result = false;}
return result;
}
function progress(a, b, c) {
d = b - a;
return b + d == c;
}
function progress(a,b,c){
if (b-a == c-b || a-b == c-a || a-c == b-a){
return true
}
else{
return false
}
}
function progress(a, b, c)
{
let arr = [];
arr.push(a);
arr.push(b);
arr.push(c);
arr.sort();
if (arr[1] - arr[0] == arr[2] - arr[1]) return true;
else return false;
}
function progress(a,b,c){
return (a-b===b-c) || (c-a===a-b)
}
function progress (a, b, c) {
return b - a == c - b;
}
function progress(a, b, c) {
let arr = [a, b ,c];
arr.sort((a , b) => a - b);
if( arr[1] - arr[0] === arr[2] - arr[1])
return true;
return false;
}
function progress(a, b, c){
return c-b === b-a
}
function progress(a, b, c) {
let arr = [a, b, c];
arr.sort();
if (arr[2]-arr[1] == arr[1]-arr[0])
return true;
else
return false;
}
function progress(a, b, c){
if(c-b==b-a || c-a==a-b || b-c==c-a || b-a==a-c || a-b==b-c || a-c==c-b)
return true;
}
function progress(a, b, c)
{
return (a-b == b-c||a-c == c-b||b-c == c-a || b-a == a-c || c-a == a-b || c-b == b-a)
}
function progress(a, b, c){
return ((a+b)/2==c || (c+b)/2==a || (a+c)/2==b)
}
function progress(a, b, c,){
if (a-c==c-b || b-c==c-a || a-b==b-c || b-a==c-b || a-b==c-a || b-a==a-c)
return true;
else {
return false;
}
}
function progress(a, b, c) {//acb bac bca cba cab
if((b-a == c-b) || (c-a == b-c) || (a-b == c-a) || (c-b == a-c) || (b-c == a-b) || (a-c == b-a)){
return true;
}else{
return false;
}
}
function progress(a, b, c) {
return a + b + c - Math.max(a, b, c) - Math.min(a, b, c) * 2 == Math.max(a, b, c) - (a + b + c - Math.max(a, b, c) - Math.min(a, b, c));
}
function progress(a, b, c) {
let array = [a, b, c].sort();
return array[2] - array[1] === array[1] - array[0];
}
function progress(a, b, c) {
p = b - a;
return b + p == c;
}
function progress(a, b, c) {
arr = [a, b, c]
arr.sort()
if( arr[0]-arr[1] == arr[1]-arr[2]) return true
else return false
}
function progress(a, b, c) {
return (((a+b)/2==c) || ((a+c)/2==b) || ((c+b)/2==a))
}
function progress(a, b, c){
[a, b, c] = [a, b, c].sort();
return (c - a) / 2 == b - a;
}
function progress(a,b,c){
if (b-a==c-b || a-b==c-a || a-c==b-a){
return true
}
else{
return false
}
}
function progress(a, b, c) {
return (a-b == b-c) || (c-a == a-b);
}
function progress(a,b,c) {
return (Math.max(a,b,c)-(a+b+c-Math.min(a,b,c)-Math.max(a,b,c))==a+b+c-Math.min(a,b,c)-Math.max(a,b,c)-Math.min(a,b,c))
}
function progress (a, b, c) {
return b - a == c - b;
}
function progress(a, b, c){
let ar = [a, b, c];
ar = ar.sort((f, x) => f-x);
if(ar[1] - ar[0] == ar[2] - ar[1]) return true;
return false;
}
function progress(a, b, c)
{
let arr = [a, b, c];
arr.sort();
if (arr[1] - arr[0] == arr[2] - arr[1])
return 1;
return 0;
}
function progress(a,b,c)
{
return a-b == b-c || c-a == a-b || c-a == b-c
}
function progress(a, b, c) {
let d1 = b - a;
if(a + d1 == b && b + d1 == c)
return true;
else
return false;
}
function progress(a, b, c){
let arr = [a,b,c];
let n = arr.length;
arr.sort((a, b) => a - b);
let d = arr[1] - arr[0];
for (let i = 2; i < n; i++){
if (arr[i] - arr[i-1] != d){
return false;
}
}
return true;
}
function progress(a, b, c) {
if (c - b === b - a) {
return true;
} else {
return false;
}
}
function progress(a, b, c){
if(a - b == b - c){
return true;
}
else return false;
if(a = 0, b = 0, c = 0)return false;
}
function progress(a, b, c){
return a == (b + c)/2 || b == (a + c)/2 || c == (b + a)/2
}
function progress(a,b,c) {
[a,b,c] = [a,b,c].sort((x,y)=>x-y);
return b-a == c-b;
}
function progress (a, b, c) {
let arr = []
arr.push(a, b, c)
if (arr[1] - arr[0] == arr[2] - arr[1]) return true
else return false
}
function progress(a, b, c) {
let arr = [a,b,c];
arr.splice(arr.indexOf(Math.max(a,b,c)),1);
arr.splice(arr.indexOf(Math.min(a,b,c)),1);
if (Math.max(a,b,c) - arr[0] === arr[0] - Math.min(a,b,c))
return true;
else
return false;
}
function progress(a, b, c){
let arr = [a, b, c];
arr = arr.sort((a,b)=>a-b);
return arr[2] - arr[1] == arr[1] - arr[0]
}
function progress(a, b, c) {
if((b - a == c - b) || c - a == b - c) return true;
return false;
}
function progress(a, b, c)
{
if(a == (c + b)/2 || b == (a + c)/2 || c == (a + b)/2)
{
return true;
}
else
{
return false;
}
}
function progress ( a, b, c ) {
return ( b - a == c - b || a - b == c - a || a - c == b - a) ? true : false;
}
function progress(a, b, c) {
return ((c-b==b-a) ||(a-b==b-c) || (b-a==a-c) ||(b-c==c-a));
}
function progress(a, b, c) {
return (a - b == b - c || a - c == c - b || a - c == b - a);
}
function progress(a,b,c)
{
pr = a-b==b-c || b-a==a-c || b-c==c-a
return pr
}
function progress(a, b, c) {
let sorted = [a, b, c].sort((x, y) => x - y);
return sorted[0] - sorted[1] == sorted[1] - sorted[2];
}
function progress(a, b, c) {
return (c - b) === (b - a);
}
function progress(a,b,c){
if(b-a==c-b ||a-b == b-c ||a-c==b-c || c-a==c-b){
return true
}
return false
}
function progress(a, b, c){
if (a - b == b - c || a - c == c - b || a - b == c - a){
return true;
} else {
return false;
}
}
function progress(a,b,c){
let lowest = Math.min(a,b,c)
let sc = 0
let th = 0
if (lowest==a){
sc=Math.min(b,c)
th = Math.max(a,b,c)
}else if(lowest==b){
sc=Math.min(a,c)
th = Math.max(a,b,c)
}else{
sc=Math.min(b,a)
th = Math.max(a,b,c)
}
if((lowest+th)/2 == sc){
return true
}else{
return false
}
}
function progress(a,b,c){
if ((b - a == c - b) || (a - c == b - a) || (a - b == c - a ) ){
return true
}
return false
}
function progress(a,b,c){
let max = Math.max(a,b,c);
let min = Math.min(a,b,c);
let av;
if(a != max && a != min){
av = a;
}
if(b != max && b != min){
av = b;
}
if(c != max && c != min){
av = c;
}
if(av-min == max-av){
return true;
}
else{
return false
}
}
function progress(a,b,c){
if(b-a == c-b){
return true
}
else{
return false
}
}
function progress(a, b, c) {
return (a-b == c-a || c-b == a-c || a-c == b-a || b-c == a-b || b-a == c-a || c-a == b-a)
}
function progress(a,b,c)
{
let arr = [a,b,c]
let result = false;
let diff = arr[1]-arr[0]
for (let i = 0; i < arr.length-1; i++ )
{
if(arr[i+1]-arr[i] == diff)
{
result = true
}
else{
return false
}
}
return result
}
function progress(a,b,c){
let d = []
d.push(a)
d.push(b)
d.push(c)
d.sort()
if(d[1]-d[0]==d[2]-d[1]){
return true
}
return false
}
function progress(a, b, c) {
let array=[a,b,c].sort();
return (array[1]-array[0])==1 && (array[2]-array[1])==1?true:false;
}
function progress(...args) {
let max = args.splice(args.indexOf(Math.max(args[0], args[1], args[2])), 1);
let min = args.splice(args.indexOf(Math.min(args[0], args[1])), 1);
if (max - args[0] === args[0] - min) {
return true;
}
return false;
}
function progress(a, b, c) {
let arr = [a, b, c].sort()
if (arr[1] - arr[0] == arr[2] - arr[1]) return true
else return false
}
function progress(a, b, c) {
let arr = [a, b, c];
arr.sort((x, y) => x - y);
let [x, y, z] = arr;
return (z - y) === (y - x);
}
function progress(a, b, c)
{
let e = (b + (b - c) == a) || (c + (c - b) == a) || (a + (a - c) == b) || (c + (c - a) == b) || (a + (a - b) == c) || (b + (b - a) == c)
return e;
}
function progress(a, b, c){
function bubblesorting(arr){
let time=0;
for(let i = 0;i< arr.length;i++){
for(let j=0;j< arr.length;j++){
if(arr[j]>arr[i]){
time=arr[i];
arr[i]=arr[j];
arr[j]=time;
}
}
}
}
let arr= [a,b,c];
bubblesorting(arr);
if(arr[2] - arr[1]==arr[1]-arr[0])
return true;
else return false;
}
function progress(a, b, c) {
return ((b-a==c-b||c-a==b-c||a-b==c-a)) ? true : false;
}
function progress(a,b,c)
{
if(a-b==b-c) return true;
if((b-c)==(c-a)) return true;
if((c-a)==(a-b)) return true;
return false;
}
function progress(a, b, c) {
let arr = [a, b, c].sort()
if (arr[1] - arr[0] == arr[2] - arr[1]) return true
else return false
}
function progress(a, b, c) {
if((c == a + b || b == c + a || a == b + c) && (a !== b && b !== c && c !== a )){
return true;
}
else{
return false;
}
}
function progress(a, b, c) {
if((b - a == c - b) || (a - b == b - c) || (c - a == a - b) || (a - c == b - a)){
return true;
}
else{
return false;
}
}
function progress(a, b, c) {
if (a - b == b - a || b - a == c - b || a - c == a - b)
return true;
else return false;
}
function progress(a,b,c){
let arr = [a,b,c]
let form = arr.sort(function(a,b){return a-b})
if (form[1] - form[0] == form[2] - form[1]){
return true
}
else {
return false
}
}
console.log (progress(2,3,3))
function progress(a, b, c) {
let array = [a, b, c].sort();
return array[2] - array[1] === array[1] - array[0];
}
function progress(a, b, c) {
let sorted = [a, b, c].sort((a, b) => a - b)
let d = sorted[1] - sorted[0]
for (let i = 2; i < sorted.length; i++) {
if (sorted[i] - sorted[i - 1] !== d) {
return false
}
}
return true
}
function progress(a, b, c) {
let arr = [a,b,c];
let NewArr = arr.sort(function(a, b) { return a - b;})
let d = NewArr[1] - NewArr[0];
let count = 0;
for(let i = 0; i < NewArr.length - 1; i++){
if((NewArr[i] + d) == NewArr[i+1]){
count++;
}
}
if(count == NewArr.length-1){
return true;
}else {
return false;
}
}
function progress(a,b,c){
return ((a+b+c)/3-Math.min(a, Math.min(b,c))==Math.max(a,(Math.max(b,c)))-(a+b+c)/3)
}
function progress(a, b, c) {
if(c-b===b-a ||a-b===b-c ||c-a===a-b ||a-c===c-b ||b-c===c-a ||b-a===a-c){
return true;
}
return false;
}
function progress(a,b,c){
let d = Math.min(a,b,c)
let e = Math.max(a,b,c)
let f = a + b + c - d - e
if(f - e == d -f )
{return true}
else false
}
function progress(a, b, c) {
return c - b == b - a || c - a == a - b || b - a == a - c || b - c == c - a || a - c == c - b || a - b == b - c
}
function progress ( a, b, c ) {
return ( b - a == c - b || a - b == c - a || a - c == b - a) ? true : false;
}
function progress(a, b, c) {
let array = [a, b, c].sort();
return array[2] - array[1] === array[1] - array[0];
}
function progress(a, b, c){
let diff = a - b;
if (b - c == diff && a - c == diff * 2){
return true
}
}
let arrToSort = [a, b, c];
arrToSort.sort((x,y)=> x-y);
return arrToSort[2] - arrToSort[1] == arrToSort[1] - arrToSort[0];
}
if (b-a == c-b || a-b == c-a || a-c == b-a){
return true
}
return false
}
let arr = [a, b, c];
arr.sort();
if(arr[2]-arr[1]==arr[1]-arr[0])
return true;
else
return false;
}
nums.sort((a, b) => a - b);
return ( nums[0] - nums[1] == nums[1] - nums[2])? true:false
}
let arr = [a,b,c].sort();
return b - a == c - b;
}
let arr = [a, b, c];
arr.sort();
if(arr[0]-arr[1]==arr[1]-arr[2])
return true;
return false;
}
if(a-b == b-c || a-c == c-b||b-a == c-b || c-a == b-c){return true}
else{return false}
}
let k = Math.min(a,b,c)
let h = Math.max(a,b,c)
let s;
if(k!==a & h!==a) s = a
else if(k!==b & h!==b) s = b
else s = c
return (h-s)==(s-k)
}
if(a-b==b-c||c-b==b-a||a-c==c-b||c-a==a-b||b-a==a-c||b-c==c-a){return true}
else{return false;}
}
let arr = [a,b,c]
let result = false;
let diff = arr[1]-arr[0]
for (let i = 0; i< arr.length-1;i++){
if (arr[i+1]-arr[i] == diff){
result = true
}
else{
return false
}
}
return result
}
myar = [a,b,c]
myar.sort(function(a,b){return a-b})
dif = myar[1]-myar[0]
if(myar[0]+dif == myar[1] && myar[1]+dif == myar[2]){
return true
} else return false
}
let arr = [a, b, c].sort()
if (arr[1] - arr[0] == arr[2] - arr[1]) return true
else return false
}
let m = [a, b, c];
m.sort();
return m[1] - m[0] == m[2] - m[1];
}
let arry = [a,b,c];
arry.sort();
if (Math.abs(arry[0]-arry[1]) == Math.abs(arry[1]-arry[2])) return true;
else return false;
}
let m = [a, b, c];
m.sort(com);
return m[1] - m[0] == m[2] - m[1]
}
function com(x, y){
return x - y;
}
return b == a +(b-a) && c == a + (b-a) * 2;
}
{
function compare (x,y)
{
return x-y;
}
let arr = [a, b, c];
let result = false;
arr.sort(compare);
let d = arr[1] - arr[0];
for(let i = 2; i < arr.length; i++)
{
if(arr[i-1] + d == arr[i])
{
result = true;
}
else
{
result = false;
}
}
return result;
}
if ((c-b==b-a)||(b-c==c-a)||(a-b==b-c)||(c-a==a-b)||(b-a==a-c)||(a-c==c-b)){
return true;
}
else
return false;
}
return ((b-a==c-b||c-a==b-c||a-b==c-a)) ? true : false;
}
let array = [a, b, c].sort();
return array[2] - array[1] === array[1] - array[0];
}
if (b - a == c - b)
return true
else
return false
}
let arr = [a, b, c];
arr.sort();
let d = arr[1] - arr[0];
let result = (arr[2] - arr[1] == d) ? true : false;
return result;
}
{
let arr = [a,b,c].sort((a, b) => a - b);
if(arr[0] - arr[1] == arr[1] - arr[2])
return true
return false
}
let q = ((Math.max(a,b,c) + Math.min(a,b,c)) / 2)
if((Math.max(a,b,c)) - (Math.min(a,b,c)) == q) {
return true;
} else {return false}
}
return (a-b==b-c) || (c-a==a-b)
}
if(a-b == b-c || b - a == a - c || c - b == b - a || a - c == c - b || c - a == a - b || b - c == c - a){
return true
}else{
return false
}
}
let max = args.splice(args.indexOf(Math.max(args[0], args[1], args[2])), 1);
let min = args.splice(args.indexOf(Math.min(args[0], args[1])), 1);
if (max - args[0] === args[0] - min) return true;
return false;
}
const arr_of_num = [a, b, c];
if(a==b||a==c||b==c){
return false
}
else if(arr_of_num.indexOf(Math.max(a, b, c) - Math.min(a, b, c))!=-1){
return true
}
else{
return false
}
}
if (a == undefined || b == undefined || c == undefined) {
return false;
}
if (a + c == 2 * b || b + a == 2 * c || c + b == 2 * a) {
return true;
}
return false;
}
let zxc = [z, x, c];
zxc.sort();
return zxc[1] - zxc[0] == zxc[2] -zxc[1];
}
return a - b == b - c
}
d = b - a;
return b + d == c;
}
return a-b == b-c || a-c == c-b || b-a == a-c || b-c == c-a || c-a == a-b || c-b == b-a
}
let result = true;
if (b-a == c-b || a-b == c-a || a-c == b-a){
result = true;
}
else{result = false;}
return result;
}
d = b - a;
return b + d == c;
}
if (b-a == c-b || a-b == c-a || a-c == b-a){
return true
}
else{
return false
}
}
{
let arr = [];
arr.push(a);
arr.push(b);
arr.push(c);
arr.sort();
if (arr[1] - arr[0] == arr[2] - arr[1]) return true;
else return false;
}
return (a-b===b-c) || (c-a===a-b)
}
return b - a == c - b;
}
let arr = [a, b ,c];
arr.sort((a , b) => a - b);
if( arr[1] - arr[0] === arr[2] - arr[1])
return true;
return false;
}
return c-b === b-a
}
let arr = [a, b, c];
arr.sort();
if (arr[2]-arr[1] == arr[1]-arr[0])
return true;
else
return false;
}
if(c-b==b-a || c-a==a-b || b-c==c-a || b-a==a-c || a-b==b-c || a-c==c-b)
return true;
}
{
return (a-b == b-c||a-c == c-b||b-c == c-a || b-a == a-c || c-a == a-b || c-b == b-a)
}
return ((a+b)/2==c || (c+b)/2==a || (a+c)/2==b)
}
if (a-c==c-b || b-c==c-a || a-b==b-c || b-a==c-b || a-b==c-a || b-a==a-c)
return true;
else {
return false;
}
}
if((b-a == c-b) || (c-a == b-c) || (a-b == c-a) || (c-b == a-c) || (b-c == a-b) || (a-c == b-a)){
return true;
}else{
return false;
}
}
return a + b + c - Math.max(a, b, c) - Math.min(a, b, c) * 2 == Math.max(a, b, c) - (a + b + c - Math.max(a, b, c) - Math.min(a, b, c));
}
let array = [a, b, c].sort();
return array[2] - array[1] === array[1] - array[0];
}
p = b - a;
return b + p == c;
}
arr = [a, b, c]
arr.sort()
if( arr[0]-arr[1] == arr[1]-arr[2]) return true
else return false
}
return (((a+b)/2==c) || ((a+c)/2==b) || ((c+b)/2==a))
}
[a, b, c] = [a, b, c].sort();
return (c - a) / 2 == b - a;
}
if (b-a==c-b || a-b==c-a || a-c==b-a){
return true
}
else{
return false
}
}
return (a-b == b-c) || (c-a == a-b);
}
return (Math.max(a,b,c)-(a+b+c-Math.min(a,b,c)-Math.max(a,b,c))==a+b+c-Math.min(a,b,c)-Math.max(a,b,c)-Math.min(a,b,c))
}
return b - a == c - b;
}
let ar = [a, b, c];
ar = ar.sort((f, x) => f-x);
if(ar[1] - ar[0] == ar[2] - ar[1]) return true;
return false;
}
{
let arr = [a, b, c];
arr.sort();
if (arr[1] - arr[0] == arr[2] - arr[1])
return 1;
return 0;
}
{
return a-b == b-c || c-a == a-b || c-a == b-c
}
let d1 = b - a;
if(a + d1 == b && b + d1 == c)
return true;
else
return false;
}
let arr = [a,b,c];
let n = arr.length;
arr.sort((a, b) => a - b);
let d = arr[1] - arr[0];
for (let i = 2; i < n; i++){
if (arr[i] - arr[i-1] != d){
return false;
}
}
return true;
}
if (c - b === b - a) {
return true;
} else {
return false;
}
}
if(a - b == b - c){
return true;
}
else return false;
if(a = 0, b = 0, c = 0)return false;
}
return a == (b + c)/2 || b == (a + c)/2 || c == (b + a)/2
}
[a,b,c] = [a,b,c].sort((x,y)=>x-y);
return b-a == c-b;
}
let arr = []
arr.push(a, b, c)
if (arr[1] - arr[0] == arr[2] - arr[1]) return true
else return false
}
let arr = [a,b,c];
arr.splice(arr.indexOf(Math.max(a,b,c)),1);
arr.splice(arr.indexOf(Math.min(a,b,c)),1);
if (Math.max(a,b,c) - arr[0] === arr[0] - Math.min(a,b,c))
return true;
else
return false;
}
let arr = [a, b, c];
arr = arr.sort((a,b)=>a-b);
return arr[2] - arr[1] == arr[1] - arr[0]
}
if((b - a == c - b) || c - a == b - c) return true;
return false;
}
{
if(a == (c + b)/2 || b == (a + c)/2 || c == (a + b)/2)
{
return true;
}
else
{
return false;
}
}
return ( b - a == c - b || a - b == c - a || a - c == b - a) ? true : false;
}
return ((c-b==b-a) ||(a-b==b-c) || (b-a==a-c) ||(b-c==c-a));
}
return (a - b == b - c || a - c == c - b || a - c == b - a);
}
{
pr = a-b==b-c || b-a==a-c || b-c==c-a
return pr
}
let sorted = [a, b, c].sort((x, y) => x - y);
return sorted[0] - sorted[1] == sorted[1] - sorted[2];
}
return (c - b) === (b - a);
}
if(b-a==c-b ||a-b == b-c ||a-c==b-c || c-a==c-b){
return true
}
return false
}
if (a - b == b - c || a - c == c - b || a - b == c - a){
return true;
} else {
return false;
}
}
let lowest = Math.min(a,b,c)
let sc = 0
let th = 0
if (lowest==a){
sc=Math.min(b,c)
th = Math.max(a,b,c)
}else if(lowest==b){
sc=Math.min(a,c)
th = Math.max(a,b,c)
}else{
sc=Math.min(b,a)
th = Math.max(a,b,c)
}
if((lowest+th)/2 == sc){
return true
}else{
return false
}
}
if ((b - a == c - b) || (a - c == b - a) || (a - b == c - a ) ){
return true
}
return false
}
let max = Math.max(a,b,c);
let min = Math.min(a,b,c);
let av;
if(a != max && a != min){
av = a;
}
if(b != max && b != min){
av = b;
}
if(c != max && c != min){
av = c;
}
if(av-min == max-av){
return true;
}
else{
return false
}
}
if(b-a == c-b){
return true
}
else{
return false
}
}
return (a-b == c-a || c-b == a-c || a-c == b-a || b-c == a-b || b-a == c-a || c-a == b-a)
}
{
let arr = [a,b,c]
let result = false;
let diff = arr[1]-arr[0]
for (let i = 0; i < arr.length-1; i++ )
{
if(arr[i+1]-arr[i] == diff)
{
result = true
}
else{
return false
}
}
return result
}
let d = []
d.push(a)
d.push(b)
d.push(c)
d.sort()
if(d[1]-d[0]==d[2]-d[1]){
return true
}
return false
}
let array=[a,b,c].sort();
return (array[1]-array[0])==1 && (array[2]-array[1])==1?true:false;
}
let max = args.splice(args.indexOf(Math.max(args[0], args[1], args[2])), 1);
let min = args.splice(args.indexOf(Math.min(args[0], args[1])), 1);
if (max - args[0] === args[0] - min) {
return true;
}
return false;
}
let arr = [a, b, c].sort()
if (arr[1] - arr[0] == arr[2] - arr[1]) return true
else return false
}
let arr = [a, b, c];
arr.sort((x, y) => x - y);
let [x, y, z] = arr;
return (z - y) === (y - x);
}
{
let e = (b + (b - c) == a) || (c + (c - b) == a) || (a + (a - c) == b) || (c + (c - a) == b) || (a + (a - b) == c) || (b + (b - a) == c)
return e;
}
function bubblesorting(arr){
let time=0;
for(let i = 0;i< arr.length;i++){
for(let j=0;j< arr.length;j++){
if(arr[j]>arr[i]){
time=arr[i];
arr[i]=arr[j];
arr[j]=time;
}
}
}
}
let arr= [a,b,c];
bubblesorting(arr);
if(arr[2] - arr[1]==arr[1]-arr[0])
return true;
else return false;
}
return ((b-a==c-b||c-a==b-c||a-b==c-a)) ? true : false;
}
{
if(a-b==b-c) return true;
if((b-c)==(c-a)) return true;
if((c-a)==(a-b)) return true;
return false;
}
let arr = [a, b, c].sort()
if (arr[1] - arr[0] == arr[2] - arr[1]) return true
else return false
}
if((c == a + b || b == c + a || a == b + c) && (a !== b && b !== c && c !== a )){
return true;
}
else{
return false;
}
}
if((b - a == c - b) || (a - b == b - c) || (c - a == a - b) || (a - c == b - a)){
return true;
}
else{
return false;
}
}
if (a - b == b - a || b - a == c - b || a - c == a - b)
return true;
else return false;
}
let arr = [a,b,c]
let form = arr.sort(function(a,b){return a-b})
if (form[1] - form[0] == form[2] - form[1]){
return true
}
else {
return false
}
}
console.log (progress(2,3,3))
let array = [a, b, c].sort();
return array[2] - array[1] === array[1] - array[0];
}
let sorted = [a, b, c].sort((a, b) => a - b)
let d = sorted[1] - sorted[0]
for (let i = 2; i < sorted.length; i++) {
if (sorted[i] - sorted[i - 1] !== d) {
return false
}
}
return true
}
let arr = [a,b,c];
let NewArr = arr.sort(function(a, b) { return a - b;})
let d = NewArr[1] - NewArr[0];
let count = 0;
for(let i = 0; i < NewArr.length - 1; i++){
if((NewArr[i] + d) == NewArr[i+1]){
count++;
}
}
if(count == NewArr.length-1){
return true;
}else {
return false;
}
}
return ((a+b+c)/3-Math.min(a, Math.min(b,c))==Math.max(a,(Math.max(b,c)))-(a+b+c)/3)
}
if(c-b===b-a ||a-b===b-c ||c-a===a-b ||a-c===c-b ||b-c===c-a ||b-a===a-c){
return true;
}
return false;
}
let d = Math.min(a,b,c)
let e = Math.max(a,b,c)
let f = a + b + c - d - e
if(f - e == d -f )
{return true}
else false
}
return c - b == b - a || c - a == a - b || b - a == a - c || b - c == c - a || a - c == c - b || a - b == b - c
}
return ( b - a == c - b || a - b == c - a || a - c == b - a) ? true : false;
}
let array = [a, b, c].sort();
return array[2] - array[1] === array[1] - array[0];
}
let diff = a - b;
if (b - c == diff && a - c == diff * 2){
return true
}
}