K = 40*64*2
i - 16 бит
I - ?
Реш.
I = K*i = 40*64*2*16 бит = (40*64*2*16)/8 байт = 40*8*2*16 байт = (40*8*2*16)/1024 Кбайт = сокращаешь получается 10 Кб
Var i: byte;
begin
randomize;
for i := 1 to 10 do
writeln(random(100)+50);
end.
#include <iostream>
#include <string>
using namespace std;
string arabicToRoman(unsigned &number)
{
const unsigned count = 13;unsigned arabic[count] = { 1000, 900, 500, 400, 100, 90, 50, 40, 10, 9, 5, 4, 1
}, i, j;
string roman[count] = { "M", "CM", "D", "CD", "C", "XC", "L", "XL", "X", "IX",
"V", "IV", "I" }, result = "";
for (i = 0; i < count; i++) {
for (j = 0; j < number / arabic[i]; j++) {
result += roman[i];
}
number %= arabic[i];
}
return result;
}
int main()
{
unsigned uin = 0;
cin >> uin;
cout << arabicToRoman(uin);
system("pause");
return 0;
}