Задачи на функции тестируются добавлением к вашей программы функции main()
,
которая выглядит следующим образом:
int main() { int a, b, c, d; cin >> a >> b >> c >> d; cout << min(a, b, c, d) << endl; return 0; }
int main() { double x1, y1, x2, y2; cin >> x1 >> y1 >> x2 >> y2; cout << dist(x1, y1, x2, y2) << endl; return 0; }
int main() { double x, y; cin >> x >> y; cout << (is_point_in_square(x, y) ? "YES" : "NO") << endl; return 0; }
int main() { double x, y; cin >> x >> y; cout << (is_point_in_rhombus(x, y) ? "YES" : "NO") << endl; return 0; }
int main() { double x1, y1, x2, y2, r; cin >> x1 >> y1 >> x2 >> y2 >> r; cout << (is_point_in_circle(x1, y1, x2, y2, r) ? "YES" : "NO") << endl; return 0; }
int main() { double x, y; cin >> x >> y; cout << (is_point_in_area(x, y) ? "YES" : "NO") << endl; return 0; }
int main() { long long n; cin >> n; cout << min_divisor(n) << endl; return 0; }
int main() { long long n; cin >> n; cout << (is_prime(n) ? "YES" : "NO") << endl; return 0; }
int main() { int n, m; cin >> n >> m; reduce_fraction(n, m); cout << n << " " << m << endl; return 0; }
int main() { int a, b, q, r; cin >> a >> b; div_mod(a, b, q, r); cout << q << " " << r << endl; return 0; }
int main() { int a, b, c, d; cin >> a >> b >> c >> d; sort(a, b, c, d); cout << a << " " << b << " " << c << " " << d << endl; return 0; }
int main() { double a; int n; cin >> a >> n; cout << power(a, n) << endl; return 0; }
int main() { int n, k; cin >> n; cout << fib(n) << endl; return 0; }
int main() { int n; cin >> n; print(n); return 0; }
int main() { cout << sum() << endl; return 0; }
int main() { reverse(); }
int main() { double a; int n; cin >> a >> n; cout.precision(16); cout << power(a, n) << endl; return 0; }
int main() { int a, b; cin >> a >> b; cout << gcd(a, b) << endl; }
int main() { int n; cin >> n; move(n, 1, 3); return 0; }