/* 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 m = (a < b) ? a : b;
return (m < c) ? m : c;
}
{
if (min(5, 8, 6) != 5) {
System.
out.
println("1) Неправильно для a"); //вывод=5 }
if (min(5, 6, 8) != 5) {
System.
out.
println("2) Неправильно для a"); //вывод=5 }
if (min(-3, -5, -2) != -5) {
System.
out.
println("3) Неправильно для отрицательных чисел"); //вывод=-5 }
if (min(10, 5, 20) != 5) {
System.
out.
println("4) Неправильно для b"); //вывод=5 }
if (min(20, 5, 10) != 5) {
System.
out.
println("5) Неправильно для b"); //вывод=5 }
if (min(5, 5, 5) != 5) {
System.
out.
println("6) Неправильно для всех равных чисел"); //вывод=5 }
if (min(8, 7, 5) != 5) {
System.
out.
println("7) Неправильно для c"); //вывод=5 }
if (min(7, 8, 5) != 5) {
System.
out.
println("8) Неправильно для c"); //вывод=5 }
if (min(5, 5, 6) != 5) {
System.
out.
println("9) Неправильно для пары равных чисел"); //вывод=5 }
}
}
LyogcGFja2FnZSB3aGF0ZXZlcjsgLy8gZG9uJ3QgcGxhY2UgcGFja2FnZSBuYW1lISAqLwoKaW1wb3J0IGphdmEudXRpbC4qOwppbXBvcnQgamF2YS5sYW5nLio7CmltcG9ydCBqYXZhLmlvLio7CgovKiBOYW1lIG9mIHRoZSBjbGFzcyBoYXMgdG8gYmUgIk1haW4iIG9ubHkgaWYgdGhlIGNsYXNzIGlzIHB1YmxpYy4gKi8KY2xhc3MgSWRlb25lCnsKICAgIHB1YmxpYyBzdGF0aWMgaW50IG1pbihpbnQgYSwgaW50IGIsIGludCBjKQogICAgewogICAgICAgIGludCBtID0gKGEgPCBiKSA/IGEgOiBiOwogICAgICAgIHJldHVybiAobSA8IGMpID8gbSA6IGM7CiAgICB9CgogICAgcHVibGljIHN0YXRpYyB2b2lkIG1haW4oU3RyaW5nW10gYXJncykgdGhyb3dzIEV4Y2VwdGlvbgogICAgewogICAgICAgIGlmIChtaW4oNSwgOCwgNikgIT0gNSkgewogICAgICAgICAgICBTeXN0ZW0ub3V0LnByaW50bG4oIjEpINCd0LXQv9GA0LDQstC40LvRjNC90L4g0LTQu9GPIGEiKTsgLy/QstGL0LLQvtC0PTUKICAgICAgICB9CiAgICAgICAgaWYgKG1pbig1LCA2LCA4KSAhPSA1KSB7CiAgICAgICAgICAgIFN5c3RlbS5vdXQucHJpbnRsbigiMikg0J3QtdC/0YDQsNCy0LjQu9GM0L3QviDQtNC70Y8gYSIpOyAvL9Cy0YvQstC+0LQ9NQogICAgICAgIH0KICAgICAgICBpZiAobWluKC0zLCAtNSwgLTIpICE9IC01KSB7CiAgICAgICAgICAgIFN5c3RlbS5vdXQucHJpbnRsbigiMykg0J3QtdC/0YDQsNCy0LjQu9GM0L3QviDQtNC70Y8g0L7RgtGA0LjRhtCw0YLQtdC70YzQvdGL0YUg0YfQuNGB0LXQuyIpOyAvL9Cy0YvQstC+0LQ9LTUKICAgICAgICB9CiAgICAgICAgaWYgKG1pbigxMCwgNSwgMjApICE9IDUpIHsKICAgICAgICAgICAgU3lzdGVtLm91dC5wcmludGxuKCI0KSDQndC10L/RgNCw0LLQuNC70YzQvdC+INC00LvRjyBiIik7IC8v0LLRi9Cy0L7QtD01CiAgICAgICAgfQogICAgICAgIGlmIChtaW4oMjAsIDUsIDEwKSAhPSA1KSB7CiAgICAgICAgICAgIFN5c3RlbS5vdXQucHJpbnRsbigiNSkg0J3QtdC/0YDQsNCy0LjQu9GM0L3QviDQtNC70Y8gYiIpOyAvL9Cy0YvQstC+0LQ9NQogICAgICAgIH0KICAgICAgICBpZiAobWluKDUsIDUsIDUpICE9IDUpIHsKICAgICAgICAgICAgU3lzdGVtLm91dC5wcmludGxuKCI2KSDQndC10L/RgNCw0LLQuNC70YzQvdC+INC00LvRjyDQstGB0LXRhSDRgNCw0LLQvdGL0YUg0YfQuNGB0LXQuyIpOyAvL9Cy0YvQstC+0LQ9NQogICAgICAgIH0KICAgICAgICBpZiAobWluKDgsIDcsIDUpICE9IDUpIHsKICAgICAgICAgICAgU3lzdGVtLm91dC5wcmludGxuKCI3KSDQndC10L/RgNCw0LLQuNC70YzQvdC+INC00LvRjyBjIik7IC8v0LLRi9Cy0L7QtD01CiAgICAgICAgfQogICAgICAgIGlmIChtaW4oNywgOCwgNSkgIT0gNSkgewogICAgICAgICAgICBTeXN0ZW0ub3V0LnByaW50bG4oIjgpINCd0LXQv9GA0LDQstC40LvRjNC90L4g0LTQu9GPIGMiKTsgLy/QstGL0LLQvtC0PTUKICAgICAgICB9CiAgICAgICAgaWYgKG1pbig1LCA1LCA2KSAhPSA1KSB7CiAgICAgICAgICAgIFN5c3RlbS5vdXQucHJpbnRsbigiOSkg0J3QtdC/0YDQsNCy0LjQu9GM0L3QviDQtNC70Y8g0L/QsNGA0Ysg0YDQsNCy0L3Ri9GFINGH0LjRgdC10LsiKTsgLy/QstGL0LLQvtC0PTUKICAgICAgICB9CiAgICB9Cgp9