М
Молодежь
К
Компьютеры-и-электроника
Д
Дом-и-сад
С
Стиль-и-уход-за-собой
П
Праздники-и-традиции
Т
Транспорт
П
Путешествия
С
Семейная-жизнь
Ф
Философия-и-религия
Б
Без категории
М
Мир-работы
Х
Хобби-и-рукоделие
И
Искусство-и-развлечения
В
Взаимоотношения
З
Здоровье
К
Кулинария-и-гостеприимство
Ф
Финансы-и-бизнес
П
Питомцы-и-животные
О
Образование
О
Образование-и-коммуникации
KattyDark010203
KattyDark010203
23.02.2020 17:32 •  Информатика

Видеопамять компьютера имеет объем 512 мб. сколько графических изображений размером 350x420, палитра которых содержит 65 тыс. цветов, может храниться в памяти одновременно?

👇
Ответ:
hyrshkananastasiya
hyrshkananastasiya
23.02.2020
для хранения на один пиксель 1 цвет из 65000 цветов достаточно 2^16=65536 - 16 Бит информации или 2 Байта. Изображение имеет 350*420=147 000 пикселей. Одно изображение требует для хранения 147 000*2 = 294 000 Байт информации. Следовательно 512*1024*1024 = 536 870 912/294 000 = 1 826 изображений размером 350х420.
4,4(72 оценок)
Открыть все ответы
Ответ:
badangel888
badangel888
23.02.2020
// PascalABC.NET 3.0, сборка 1088
const
  nDay:array[1..12] of integer=(31,28,31,30,31,30,31,31,30,31,30,31);
type
  Date=record
    Day,Month,Year:integer
  end;
 
function DOW(Dat:Date):integer;
// день недели по дате. 0-Вс. 1-Пн, 7-Сб
var
  a,y,m:integer;
begin
  With Dat do begin
    a:=(14 - month) div 12;
    y:=Year-a;
    m:=month+12*a-2;
    DOW:=(7000+(day+y+y div 4-y div 100+y div 400+(31*m) div 12)) mod 7
    end
end;

procedure DMY2Date(d,m,y:integer; var data:Date);
// Преобразует к дате заданные день, месяц и год
begin
  data.Day:=d; data.Month:=m; data.Year:=y
end;

procedure LastDays(month,year:integer; var Wd,Fr:Date);
// даты последней среды (Wd) и пятницы (Fr) для месяца в году }
var
  LastDay:Date;
  n:integer;
begin
  n:=nDay[month];
  if (month=2) and (year mod 4 = 0) then Inc(n);
  DMY2Date(n,month,year,LastDay);
  n:=DOW(LastDay); // номер последнего дня недели
  Wd.Month:=month; Wd.Year:=year;
  if n<3 then Wd.Day:=LastDay.Day-(n+4)
  else
    if n=3 then Wd.Day:=LastDay.Day
    else Wd.Day:=LastDay.Day+3-n;
  Fr.Month:=month; Fr.Year:=year;
  if n<5 then Fr.Day:=LastDay.Day-(n+2)
  else
    if n=3 then Fr.Day:=LastDay.Day
    else Fr.Day:=LastDay.Day-1
end;

var
  Wd,Fr:Date;
  ff,mf:Text;
  m:integer;
begin
  Assign(ff,'father.txt'); Rewrite(ff);
  Assign(mf,'mother.txt'); Rewrite(mf);
  // Сентябрь-декабрь 2015 года
  for m:=9 to 12 do begin
    LastDays(m,2015,Wd,Fr);
    if Odd(Wd.Day) then Writeln(mf,Wd.Day,'.',m,'.2015 - 1 класс')
    else Writeln(ff,Wd.Day,'.',m,'.2015 - 1 класс');
    if Odd(Fr.Day) then Writeln(mf,Fr.Day,'.',m,'.2015 - 5 класс')
    else Writeln(ff,Fr.Day,'.',m,'.2015 - 5 класс')
  end;
  // Январь - май 2016 года
  for m:=1 to 5 do begin
    LastDays(m,2016,Wd,Fr);
    if Odd(Wd.Day) then Writeln(mf,Wd.Day,'.',m,'.2016 - 1 класс')
    else Writeln(ff,Wd.Day,'.',m,'.2016 - 1 класс');
    if Odd(Fr.Day) then Writeln(mf,Fr.Day,'.',m,'.2016 - 5 класс')
    else Writeln(ff,Fr.Day,'.',m,'.2016 - 5 класс')
  end;
  Close(ff); Close(mf)
end.

Содержимое выходных файлов:
father.txt
30.9.2015 - 1 класс
28.10.2015 - 1 класс
30.10.2015 - 5 класс
30.12.2015 - 1 класс
24.2.2016 - 1 класс
26.2.2016 - 5 класс
30.3.2016 - 1 класс

mother.txt
25.9.2015 - 5 класс
25.11.2015 - 1 класс
27.11.2015 - 5 класс
25.12.2015 - 5 класс
27.1.2016 - 1 класс
29.1.2016 - 5 класс
25.3.2016 - 5 класс
27.4.2016 - 1 класс
29.4.2016 - 5 класс
25.5.2016 - 1 класс
27.5.2016 - 5 класс
4,4(92 оценок)
Ответ:
Kimberliny
Kimberliny
23.02.2020
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 #include<fstream> #include <iostream> #include<vector> #include <stack> #include<string> #include<algorithm> using namespace std; stack<int>st; int error = 0; void operation(string command) {     if (command == "DROP")     {         if (st.size() > 0)         {             st.pop(); return;         }         else         {             error = 1; return;         }     }     if (command == "SWAP")     {         if (st.size() >= 2)         {             int a = st.top();             st.pop();             int b = st.top();             st.pop();             st.push(a);             st.push(b);             return;         }         else         {             error = 1; return;         }     }     if (command == "DUP")     {         if (st.size() > 0)         {             int a = st.top();             st.push(a);             return;         }         else         {             error = 1;             return;         }     }     if (command == "OVER")     {         if (st.size() >= 2)         {             int a = st.top();             st.pop();             int b = st.top();             st.pop();             st.push(b);             st.push(a);             st.push(b);             return;         }         else         {             error = 1; return;         }     }     if (command == "+")     {         if (st.size() >= 2)         {             int a = st.top();             st.pop();             int b = st.top();             st.pop();             st.push(a + b);         }         else         {             error = 1;             return;         }     }     if (command == "-")     {         if (st.size() >= 2)         {             int a = st.top();             st.pop();             int b = st.top();             st.pop();             st.push(b - a); return;         }         else         {             error = 1;             return;         }     }     if (command == "*")     {         if (st.size() >= 2)         {             int a = st.top();             st.pop();             int b = st.top();             st.pop();             st.push(b*a); return;         }         else         {             error = 1;             return;         }       }     if (command == "/")     {         if (st.size() >= 2)         {             int a = st.top();             st.pop();             int b = st.top();             st.pop();             st.push(b/a); return;         }         else         {             error = 1;             return;         }     } } bool isnumber(string x) {     for (int i = 0; i < x.length(); i++)     {         if (x[i] > '9' || x[i] < '0')         {             return false;         }     }     return true; } int main() {     vector<int>v;     ifstream in;     ofstream out;     in.open("input.txt");     out.open("output.txt");         string command;     while (in >> command&&error != 1)     {         if (isnumber(command) == true)         {             st.push(atoi(command.c_str())); continue;         }         operation(command);     }     if (error == 1)     {         out << "ERROR"; return 0;     }     if (st.size() == 0)     {         out << "EMPTY"; return 0;     }     while (st.size() != 0)     {         v.push_back(st.top());         st.pop();     }     reverse(v.begin(), v.end());     for (int i = 0; i < v.size(); i++)     {         out << v[i] << " ";     }     in.close();     out.close(); }
4,7(11 оценок)
Это интересно:
Новые ответы от MOGZ: Информатика
logo
Вход Регистрация
Что ты хочешь узнать?
Спроси Mozg
Открыть лучший ответ