Язык C++.
#include
using namespace std;
int main (){
int a,b;
cout << "Введите два числа: " << endl;
cin >> a >> b;
if(b < a){
cout << a + 3 << endl;
}
else {
cout << a+20 << endl << b+20 << endl;
}
}
Нада число представить двоичными триадами 45107(8)
100 101 001 000 111, затем с<span>права налево разбить на двоичные тетрады по 4 разряда и записать алфавитом 16сс
0100 1010 0100 0111=4А47</span>
В Делфи не проверял, но должна работать. Если что, пиши.
const
n=5;
m=6;
var
a:array[1..n,1..m]of integer;
i,j,s,p,min,max:integer;
begin
s:=0;
p:=0;
for i:=1 to n do
for j:=1 to m do
a[i,j]:=random(10);
min:=a[1,1];
max:=min;
for i:=1 to n do
begin
for j:=1 to m do
begin
write(a[i,j]:3);
if a[i,j]>max then max:=a[i,j];
if a[i,j]<min then min:=a[i,j];
end;
writeln
end;
for i:=1 to n do
begin
if p>2 then break;
for j:=1 to m do
begin
if p>2 then break;
if a[i,j]=max then p:=p+1;
if a[i,j]=min then p:=p+2;
if p>0 then s:=s+a[i,j];
end;
end;
writeln('S=',s)
end.
1) 9310-2=9308
2) 9308 раскладывается на множители:
9308=4*13*179
9310 | 13
9308 |----------
------- | 716 | 13
2 715|---------
------| 55 | 13
1 | 52 |------ 9310 (10сс) =4312 (13сс)
----| 4
3 ответ N=13
720 бит, это 90 байт;
N =90/180=0,5 байта или 4 бита;
Ответ: 4 бита.