#include <iostream>
#include <algorithm>
#include <string>
#include <vector>
using namespace std;
int main()
{
// Номер 1
vector <string> days;
for (int i = 0 ; i < 7 ; ++i)
{
string temp;
cin >> temp;
days.push_back(temp);
}
//Номер 2
int max1 = -2000000000;
int max2 = -2000000000;
vector <int> arr { 15, 48, 0, 144 , 52};
for(int i = 0 ; i < arr.size() ; ++i)
max1 = (arr[i] > max1 ? arr[i] : max1);
for(int i = 0 ; i < arr.size() ; ++i)
max2 = (arr[i] > max2 && arr[i] != max1 ? arr[i] : max2);
cout << "Максимум 1: " << max1 << " Максимум 2: " << max2;
//Номер 3
vector <int> numbers { 15, 24, 48, -5 , 0 , -10};
cout << count_if(numbers.begin(), numbers.end(), [] (int a) { return a > 0;});
return 0;
}
Часть 1
1.
a, b, c, d = int(input()), int(input()), int(input()), int(input())
s = (a + b + c + d)/4
print(s)
2.
x, y = int(input()), int(input())
t = x
x = y
y = t
print(x, y, sep = "\n")
4.
from math import pi
L, D = float(input()), float(input())
R = (L - D) / (2 * pi)
print(R)
5.
from math import pi
R1, R2 = float(input()), float(input())
r = R1**2 - R2**2
S = pi * r
print(S)
6.
x, y = int(input()), int(input())
S = (2*x - y)*(x - y)
print(S)
Часть 2
1.
x, y = float(input()), float(input())
x, y = y, x
print(x, y)
2.
если нужно найти y = x * 5:
x = int(input())
y = x * 5
print(y)
если нужно найти y = :
x = int(input())
y = x ** 5
print(y)
3.
x = int(input())
y = 1 - 2*x + 3*x**2 - 4*x**3
print(y)
4.
x1, y1, x2, y2 = float(input()), float(input()), float(input()), float(input())
from math import sqrt
S = sqrt((x1 - x2)**2 + (y1 - y2)**2)
print(S)