Если считать, что 1 бит = 2 цвета, 8 бит = 1 байт = 256 цветов (то есть 2 в 8 степени), 1 мбайт = 2 в 20 степени = 1 048 576 цветов.
dionissia2
25.07.2022
Псевдокод: n = введённое число для всех i от 2 до sqrt(n) включительно { если остаток от деления n на i равен 0 { написать "число составное" завершить цикл } } если цикл завершился сам по себе { написать "число простое" } python 3: from math import sqrt, floor n = int(input("введите число")) for i in range(1, floor(sqrt(n) + 1)): if n % i == 0: print("число составное") break else: print("число простое")
kulturarai44
25.07.2022
< ! doctype html> < html> < head> < style> body { text-align: center; } form { display: inline-block; width: 40%; } label { display: block; } textarea { width: 100%; height: 300px; } button { width: 45%; } < /style> < script> function deshifr() { let text = document.getelementbyid("shifr").value; let l = text.length; let nechet = text.substr(0,l/2+l%2); let chet = text.substr(l/2+l%2,l/2); let deshifr = ""; for (let i = 0, c = 0, n = 0; i < l; i++) { deshifr += (i%2? chet[c++]: nechet[n++]); } document.getelementbyid("deshifr").innerhtml = deshifr; } < /script> < /head> < body> < form> < label for="shifr"> введите зашифрованный тест сообщения: < /label> < textarea id="shifr"> < /textarea> < button type="button" onclick="deshifr()"> расшифровать< /button> < div id="deshifr"> < /div> < /form> < /body> < /html>