ответ:my_basket = {}
ware_1 = input("product name - ")
my_basket[ware_1] = int(input("value - "))
ware_2 = input("product name - ")
my_basket[ware_2] = int(input("value - "))
ware_3 = input("product name - ")
my_basket[ware_3] = int(input("value - "))
ware_4 = input("product name - ")
my_basket[ware_4] = int(input("value - "))
ware_5 = input("product name - ")
my_basket[ware_5] = int(input("value - "))
print('We bought these goods:')
print('ware -', my_basket.popitem())
print('ware -', my_basket.popitem())
print('ware -', my_basket.popitem())
print('ware -', my_basket.popitem())
print('ware -', my_basket.popitem())
print("Total cost -", total_cost)
Объяснение:
#include <iostream>
#include <vector>
#include <algorithm>
#define ll long long int
#define vi vector<int>
#define va vector<vector<int>>
#define frr(i,n) for(int i=0;i<n;i++)
#define fir(n,i) for(int i=n-1;i>=0;i--)
using namespace std;
int main(int argc, char* argv[])
{
vi s, g, h, k;
int a, b, c, d, e = 0;
cin >> a >> b;
frr(i, a) {
cin >> c;
if (c < 0) s.push_back(abs(c));
e++;
}
frr(i, b) {
cin >> c;
if (c > 0) s.push_back(abs(c));
e++;
}
sort(s.begin(), s.end());
cout << s[(e / 2)-1];
}
Объяснение:
Поделитесь своими знаниями, ответьте на вопрос:
(t - время передачи, I - объем данных, v - скорость передачи)
Передача первого файла
Дано:
I = 45 Кбайт = 45 * 1024 * 8 бит = 368640 бит
v = 1500 бит/с
t - ?
Рассчет веса второго файла
Дано:
t = 245.76 c
v = 2100 бит/с
I - ?
516096.0 бит = 64512.0 байт = 63.0 Кбайт
Разница = 63 - 45 = 20 Кбайт