ГБАВАВ, закодируем каждую букву двоичным кодом, который дан в задании, получим:
0111101010010100.
Чтобы представить в 16-тиричной системе счисления, поделим код на тетрады ( по 4 числа с конца ):
0111 1010 1001 0100
По таблице эквивалентности заменим каждое двоичное число шестнадцатиричным кодом:
7 А 9 4
Ответ: 7A94 в 16-ти ричной системе счисления.
Ответ: 32
Решение:
var arr: array [1..12] of real; s, tmp: real; element_id_1, element_id_2: integer;begin s:=0; for element_id_1:=1 to 12 do readln (arr[element_id_1]); for element_id_1:=1 to 12 do begin for element_id_2:=1 to element_id_1-1 do begin if arr[element_id_2]>arr[element_id_1] then begin tmp:=arr[element_id_2]; arr[element_id_2]:=arr[element_id_1]; arr[element_id_1]:=tmp; s:=s+1; end; end; end; writeln(s);end.
#include <iostream>
#include <vector>
using namespace std;
int main()
{
int n, m;
cin >> n >> m;
vector<vector<int>> matrix(n, vector<int>(m));
for (int i = 0; i < n; i++)
{
for (int j = 0; j < m; j++)
{
cin >> matrix[i][j];
}
}
vector<int> ans;
for (int i = 0; i < m; i++)
{
int pr = 1;
for (int j = 0; j < n; j++)
{
pr *= matrix[j][i];
}
ans.push_back(pr);
}
for (auto x : ans)
{
cout << x << " ";
}
return 0;
}
Значения элементов матрицы вводятся с клавиатуры. В векторе ans лежит ответ.
Вот так?
Program solution;
Uses Crt;
Var s : byte;
res, fact : word;
Begin
fact := 1;
res := 0;
For s := 1 to 4 do
Begin
res := res + s + fact;
fact := fact * (s + 1);
End;
Write(res);
ReadKey;
End.