/* package whatever; // don't place package name! */
import java.util.*;
import java.lang.*;
import java.io.*;
/* Name of the class has to be "Main" only if the class is public. */
class Ideone
{
public static int min(int a, int b, int c, int d)
{
int mass[]=new int[4];
mass[0]=a;
mass[1]=b;
mass[2]=c;
mass[3]=d;
for(int i=0;i<4;i++)
{
if(mass[i]>mass[i+1])
{
int temp=mass[i];
mass[i]=mass[i+1];
mass[i+1]=temp;
}
}
int R=mass[0];
return R;//напишите тут ваш код
}
public static int min(int a, int b)
{
if(a>b)
return b;
else
return a;//напишите тут ваш код
}
{
System.
out.
println( min
(-20,
-10) ); System.
out.
println( min
(-20,
-10,
-30,
-40) ); System.
out.
println( min
(-20,
-10,
-30,
40) ); }
}
LyogcGFja2FnZSB3aGF0ZXZlcjsgLy8gZG9uJ3QgcGxhY2UgcGFja2FnZSBuYW1lISAqLwoKaW1wb3J0IGphdmEudXRpbC4qOwppbXBvcnQgamF2YS5sYW5nLio7CmltcG9ydCBqYXZhLmlvLio7CgovKiBOYW1lIG9mIHRoZSBjbGFzcyBoYXMgdG8gYmUgIk1haW4iIG9ubHkgaWYgdGhlIGNsYXNzIGlzIHB1YmxpYy4gKi8KY2xhc3MgSWRlb25lCnsKCSBwdWJsaWMgc3RhdGljIGludCBtaW4oaW50IGEsIGludCBiLCBpbnQgYywgaW50IGQpCiAgICB7CiAgICAgICBpbnQgbWFzc1tdPW5ldyBpbnRbNF07CiAgICAgICBtYXNzWzBdPWE7CiAgICAgICBtYXNzWzFdPWI7CiAgICAgICBtYXNzWzJdPWM7CiAgICAgICBtYXNzWzNdPWQ7CiAgICAgICBmb3IoaW50IGk9MDtpPDQ7aSsrKQogICAgICAgewogICAgICAgICAgIGlmKG1hc3NbaV0+bWFzc1tpKzFdKQogICAgICAgICAgIHsKICAgICAgICAgICAgICAgaW50IHRlbXA9bWFzc1tpXTsKICAgICAgICAgICAgICAgbWFzc1tpXT1tYXNzW2krMV07CiAgICAgICAgICAgICAgIG1hc3NbaSsxXT10ZW1wOwogICAgICAgICAgIH0KICAgICAgICAgIAogICAgICAgfQogICAgICAgIGludCBSPW1hc3NbMF07CiAgICAgICAgcmV0dXJuIFI7Ly/QvdCw0L/QuNGI0LjRgtC1INGC0YPRgiDQstCw0Ygg0LrQvtC0IAogICAgfQoKICAgIHB1YmxpYyBzdGF0aWMgaW50IG1pbihpbnQgYSwgaW50IGIpCiAgICB7CiAgICAgICBpZihhPmIpCiAgICAgICByZXR1cm4gYjsKICAgICAgIGVsc2UKICAgICAgIHJldHVybiBhOy8v0L3QsNC/0LjRiNC40YLQtSDRgtGD0YIg0LLQsNGIINC60L7QtAoKICAgIH0KCiAgICBwdWJsaWMgc3RhdGljIHZvaWQgbWFpbihTdHJpbmdbXSBhcmdzKSB0aHJvd3MgRXhjZXB0aW9uCiAgICB7CiAgICAgICAgU3lzdGVtLm91dC5wcmludGxuKCBtaW4oLTIwLCAtMTApICk7CiAgICAgICAgU3lzdGVtLm91dC5wcmludGxuKCBtaW4oLTIwLCAtMTAsIC0zMCwgLTQwKSApOwogICAgICAgIFN5c3RlbS5vdXQucHJpbnRsbiggbWluKC0yMCwgLTEwLCAtMzAsIDQwKSApOwogICAgfQp9