{"id":469276,"date":"2025-08-01T03:01:14","date_gmt":"2025-08-01T03:01:14","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=469276"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=469276","title":{"rendered":"<span>(\u041d\u0435)\u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u0435 \u0447\u0438\u0441\u043b\u0430 \u0432 VBA Excel \u0427. 1<\/span>"},"content":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u041d\u0435\u0434\u0430\u0432\u043d\u043e \u043c\u043d\u0435 \u043f\u0440\u0438\u0448\u043b\u0430 \u0432 \u0433\u043e\u043b\u043e\u0432\u0443 \u0438\u0434\u0435\u044f \u043f\u043e\u043a\u043e\u0432\u044b\u0440\u044f\u0442\u044c\u0441\u044f \u0432 \u043d\u0435\u0434\u0440\u0430\u0445 \u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440\u0430 \u0441\u043a\u0440\u0438\u043f\u0442\u043e\u0432\u043e\u0433\u043e \u044f\u0437\u044b\u043a\u0430 VBA, \u0432\u0448\u0438\u0442\u043e\u0433\u043e \u0432\u043d\u0443\u0442\u0440\u044c \u0441\u0442\u0430\u0440\u043e\u0439 \u0434\u043e\u0431\u0440\u043e\u0439 Excel. \u041a\u043e\u043d\u0435\u0447\u043d\u043e, \u043d\u0438 \u0434\u043b\u044f \u043a\u043e\u0433\u043e \u043d\u0435 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0441\u0435\u043a\u0440\u0435\u0442\u043e\u043c, \u0447\u0442\u043e \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u044b \u043a\u043e\u0440\u043f\u043e\u0440\u0430\u0446\u0438\u0438 Microsoft \u0442\u0430\u044f\u0442 \u0432 \u0441\u0435\u0431\u0435 \u043f\u043e\u0438\u0441\u0442\u0438\u043d\u0435 \u0431\u0435\u0437\u0434\u043e\u043d\u043d\u044b\u0435 \u0433\u043b\u0443\u0431\u0438\u043d\u044b, \u0438 \u044d\u0442\u0438 \u0433\u043b\u0443\u0431\u0438\u043d\u044b \u043c\u043e\u0433\u0443\u0442 \u0437\u0430\u0442\u044f\u043d\u0443\u0442\u044c \u0432 \u0441\u0435\u0431\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u043d\u0435\u043e\u0441\u0442\u043e\u0440\u043e\u0436\u043d\u043e\u0433\u043e \u0438\u0445 \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044f. \u041a\u0430\u0437\u0430\u043b\u043e\u0441\u044c \u0431\u044b \u2013 \u0432\u0441\u0435\u043c \u0434\u0430\u0432\u043d\u043e \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u044b\u0439 (\u0432 \u0443\u0437\u043a\u0438\u0445 \u043a\u0440\u0443\u0433\u0430\u0445, \u043a\u043e\u043d\u0435\u0447\u043d\u043e) VBA, \u0437\u0430\u0441\u0442\u044b\u0432\u0448\u0438\u0439 \u0432 \u0441\u0432\u043e\u0435\u043c \u0440\u0430\u0437\u0432\u0438\u0442\u0438\u0438 \u044f\u0437\u044b\u043a. \u0427\u0442\u043e \u0442\u0430\u043c \u0435\u0449\u0435 \u043c\u043e\u0436\u043d\u043e \u043e\u0442\u043a\u043e\u043f\u0430\u0442\u044c? \u0421\u043f\u043e\u0439\u043b\u0435\u0440: \u043e\u0442\u043a\u043e\u043f\u0430\u0442\u044c \u043d\u043e\u0432\u043e\u0433\u043e \u0442\u0430\u043c \u0432\u0440\u044f\u0434 \u043b\u0438 \u0447\u0442\u043e-\u0442\u043e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u043d\u043e \u0432\u043e\u0442 \u043a\u043e\u043f\u043d\u0443\u0442\u044c \u043f\u043e\u0433\u043b\u0443\u0431\u0436\u0435 &#8212; \u044d\u0442\u043e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e. <\/p>\n<p>\u041f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u0442\u0430\u043a \u0436\u0435 \u0440\u0430\u0441\u0441\u0443\u0436\u0434\u0430\u043b \u0438 \u044f, \u043a\u043e\u0433\u0434\u0430 \u043d\u0430\u0436\u0438\u043c\u0430\u043b \u0434\u0432\u0435 \u043a\u043b\u0430\u0432\u0438\u0448\u0438 <strong>Alt<\/strong>+<strong>F11<\/strong>, \u043f\u043e\u0441\u043b\u0435 \u0442\u043e\u0433\u043e \u043a\u0430\u043a \u043e\u0442\u043a\u0440\u044b\u043b \u043d\u043e\u0432\u0443\u044e \u043a\u043d\u0438\u0433\u0443 \u0434\u043e \u0431\u043e\u043b\u0438 \u0437\u043d\u0430\u043a\u043e\u043c\u043e\u0439 Excel\u2019\u043a\u0438. \u041c\u043e\u0435\u0439 \u0446\u0435\u043b\u044c\u044e \u0431\u044b\u043b\u043e \u0432\u0431\u0438\u0442\u044c \u043f\u0440\u043e\u0441\u0442\u0435\u043d\u044c\u043a\u0438\u0439 \u043a\u043e\u0434 \u0438\u0437 \u0441\u0430\u043c\u043e\u0443\u0447\u0438\u0442\u0435\u043b\u044f \u043f\u043e VBA \u0438 \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u043f\u043e\u0438\u0433\u0440\u0430\u0442\u044c\u0441\u044f \u0441 \u043d\u0438\u043c. \u041f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c, \u0447\u0442\u043e \u0432\u044b\u0434\u0430\u0441\u0442 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430 \u2013 \u0435\u0441\u043b\u0438 \u0432\u044b\u0440\u0430\u0436\u0430\u0442\u044c\u0441\u044f \u0441\u0442\u0443\u0434\u0435\u043d\u0447\u0435\u0441\u043a\u0438\u043c \u044f\u0437\u044b\u043a\u043e\u043c, \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043e\u0431\u044b\u0447\u043d\u0443\u044e \u043b\u0430\u0431\u043e\u0440\u0430\u0442\u043e\u0440\u043d\u0443\u044e \u0440\u0430\u0431\u043e\u0442\u0443. \u0418 \u0432 \u044d\u0442\u043e\u0442 \u043c\u043e\u043c\u0435\u043d\u0442 \u043c\u043d\u0435 \u043d\u0430 \u0433\u043b\u0430\u0437\u0430 \u043f\u043e\u043f\u0430\u043b\u0430\u0441\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u044f Rnd(), \u043a\u043e\u0442\u043e\u0440\u0430\u044f, \u043a\u0430\u043a \u0441\u043e\u043e\u0431\u0449\u0430\u0435\u0442 <a href=\"https:\/\/learn.microsoft.com\/ru-ru\/office\/vba\/language\/reference\/user-interface-help\/rnd-function\" rel=\"noopener noreferrer nofollow\">\u0441\u043f\u0440\u0430\u0432\u043a\u0430 Microsoft<\/a>, \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435, \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0435\u0435 \u043f\u0441\u0435\u0432\u0434\u043e\u0441\u043b\u0443\u0447\u0430\u0439\u043d\u043e\u0435 \u0447\u0438\u0441\u043b\u043e.\u00a0\u00a0<\/p>\n<p>\u041d\u0430 \u0442\u043e\u0442 \u043c\u043e\u043c\u0435\u043d\u0442 \u043d\u0438\u0447\u0442\u043e \u043d\u0435 \u043f\u0440\u0435\u0434\u0432\u0435\u0449\u0430\u043b\u043e \u043a\u0430\u043a\u043e\u0439-\u043b\u0438\u0431\u043e \u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438. \u0414\u0430, \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440 \u043f\u0441\u0435\u0432\u0434\u043e\u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u0445 \u0447\u0438\u0441\u0435\u043b, \u0432\u0448\u0438\u0442\u044b\u0439 \u0432 VBA \u2013 \u043f\u0440\u043e\u0441\u0442\u043e\u0439 <strong><em>\u043b\u0438\u043d\u0435\u0439\u043d\u044b\u0439 \u043a\u043e\u043d\u0433\u0440\u0443\u044d\u043d\u0442\u043d\u044b\u0439 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c<\/em><\/strong>. \u041d\u0438\u0447\u0435\u0433\u043e \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0433\u043e, \u043a\u0430\u0437\u0430\u043b\u043e\u0441\u044c \u0431\u044b. \u0418 \u0438\u043c\u0435\u043d\u043d\u043e \u0432 \u044d\u0442\u043e\u0442 \u043c\u043e\u043c\u0435\u043d\u0442 \u043c\u0435\u043d\u044f \u0443\u0433\u043e\u0440\u0430\u0437\u0434\u0438\u043b\u043e \u0437\u0430\u0433\u043b\u044f\u043d\u0443\u0442\u044c \u0432 \u043a\u0440\u043e\u043b\u0438\u0447\u044c\u044e \u043d\u043e\u0440\u0443, \u0433\u043b\u0443\u0431\u0438\u043d\u044b \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043e\u043a\u0430\u0437\u0430\u043b\u0438\u0441\u044c \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u0432\u043d\u0443\u0448\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u043c\u0438. <\/p>\n<p>\u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u0447\u0438\u0442\u0430\u0442\u0435\u043b\u044f \u0442\u0430\u043a\u0436\u0435 \u0437\u0430\u0438\u043d\u0442\u0435\u0440\u0435\u0441\u0443\u0435\u0442 \u0432\u043e\u043f\u0440\u043e\u0441 \u043e \u0442\u043e\u043c, \u043d\u0430\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0433\u043b\u0443\u0431\u043e\u043a\u0430 \u044d\u0442\u0430 \u043a\u0440\u043e\u043b\u0438\u0447\u044c\u044f \u043d\u043e\u0440\u0430. \u0415\u0441\u043b\u0438 \u044d\u0442\u043e \u0442\u0430\u043a, \u0442\u043e \u043f\u0440\u0438\u0433\u043b\u0430\u0448\u0430\u044e \u0437\u0430\u0433\u043b\u044f\u043d\u0443\u0442\u044c \u0442\u0443\u0434\u0430 \u0432\u043c\u0435\u0441\u0442\u0435 \u2013 \u043d\u0435 \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u043e, \u0447\u0442\u043e \u043d\u0430\u043c \u0432\u0441\u0435-\u0442\u0430\u043a\u0438 \u0443\u0434\u0430\u0441\u0442\u0441\u044f \u0434\u043e\u0431\u0440\u0430\u0442\u044c\u0441\u044f \u0434\u043e \u0435\u0435 \u0434\u043d\u0430. \u041f\u0440\u0438 \u044d\u0442\u043e\u043c \u043d\u0438\u043a\u0442\u043e \u043d\u0435 \u0433\u0430\u0440\u0430\u043d\u0442\u0438\u0440\u0443\u0435\u0442 (\u0434\u0430\u0436\u0435 \u0430\u0432\u0442\u043e\u0440), \u0447\u0442\u043e \u0432 \u044d\u0442\u043e\u0442 \u043c\u043e\u043c\u0435\u043d\u0442 \u0441\u043d\u0438\u0437\u0443 \u043d\u0435 \u043f\u043e\u0441\u0442\u0443\u0447\u0430\u0442&#8230; <\/p>\n<h3>\u041d\u0435\u043c\u043d\u043e\u0433\u043e \u0442\u0435\u043e\u0440\u0438\u0438<\/h3>\n<p>\u0415\u0441\u043b\u0438 \u0443 \u043d\u0430\u0441 \u0435\u0441\u0442\u044c \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u0445 \u0447\u0438\u0441\u0435\u043b, \u043c\u044b \u043d\u0438\u043a\u043e\u0433\u0434\u0430 \u0441 \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u044c\u044e \u043d\u0435 \u0441\u043c\u043e\u0436\u0435\u043c \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u0442\u044c, \u043a\u0430\u043a\u043e\u0435 \u0447\u0438\u0441\u043b\u043e \u0443 \u043d\u0430\u0441 \u00ab\u043f\u043e\u044f\u0432\u0438\u0442\u0441\u044f\u00bb \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c. \u041c\u0430\u043a\u0441\u0438\u043c\u0443\u043c, \u0447\u0442\u043e \u043c\u044b \u0441\u043c\u043e\u0436\u0435\u043c \u0434\u0435\u043b\u0430\u0442\u044c \u2013 \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0430\u043d\u0430\u043b\u0438\u0437\u0430 \u0441 \u0431\u043e\u043b\u044c\u0448\u0435\u0439 \u0438\u043b\u0438 \u043c\u0435\u043d\u044c\u0448\u0435\u0439 \u0441\u0442\u0435\u043f\u0435\u043d\u0438 \u0434\u043e\u0441\u0442\u043e\u0432\u0435\u0440\u043d\u043e\u0441\u0442\u0438 \u043f\u043e\u043f\u044b\u0442\u0430\u0442\u044c\u0441\u044f \u0435\u0433\u043e \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u0442\u044c.\u00a0 <\/p>\n<p>\u0415\u0441\u043b\u0438 \u043c\u044b \u0438\u043c\u0435\u0435\u043c \u0434\u0435\u043b\u043e \u0441 \u043f\u0441\u0435\u0432\u0434\u043e\u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u043c\u0438 \u0447\u0438\u0441\u043b\u0430\u043c\u0438, \u0442\u043e \u0437\u043d\u0430\u044f \u0437\u0430\u043a\u043e\u043d\u044b \u0438\u0445 \u043f\u043e\u044f\u0432\u043b\u0435\u043d\u0438\u044f, \u043c\u044b \u0441 \u043b\u0435\u0433\u043a\u043e\u0441\u0442\u044c\u044e (\u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0439) \u0441\u043c\u043e\u0436\u0435\u043c \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u044c \u043b\u044e\u0431\u043e\u0435 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435 \u0447\u0438\u0441\u043b\u043e \u0432 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438. \u041b\u0438\u043d\u0435\u0439\u043d\u044b\u0439 \u043a\u043e\u043d\u0433\u0440\u0443\u044d\u043d\u0442\u043d\u044b\u0439 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c (\u0438\u043b\u0438 \u043c\u0435\u0442\u043e\u0434) (\u0434\u0430\u043b\u0435\u0435, <strong><em>\u041b\u041a\u041c<\/em><\/strong>) \u2013 \u044d\u0442\u043e \u043e\u0434\u0438\u043d \u0438\u0437 \u0441\u043f\u043e\u0441\u043e\u0431\u043e\u0432 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u043f\u0441\u0435\u0432\u0434\u043e\u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u0445 \u0447\u0438\u0441\u0435\u043b. <\/p>\n<p>\u0421\u0430\u043c \u0441\u043f\u043e\u0441\u043e\u0431 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u043f\u0441\u0435\u0432\u0434\u043e\u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u0445 \u0447\u0438\u0441\u0435\u043b \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 \u041b\u041a\u041c \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u043f\u0440\u043e\u0441\u0442. \u0423 \u043d\u0430\u0441 \u0435\u0441\u0442\u044c \u0447\u0435\u0442\u044b\u0440\u0435 \u0446\u0435\u043b\u044b\u0445 \u0447\u0438\u0441\u043b\u0430:<\/p>\n<ul>\n<li>\n<p>m \u2013 <strong><em>\u043c\u043e\u0434\u0443\u043b\u044c<\/em><\/strong> \u0438\u043b\u0438 <strong><em>\u0434\u0435\u043b\u0438\u0442\u0435\u043b\u044c<\/em><\/strong> (modulus);<\/p>\n<\/li>\n<li>\n<p>a \u2013 <strong><em>\u043c\u043d\u043e\u0436\u0438\u0442\u0435\u043b\u044c<\/em><\/strong> (multiplier);<\/p>\n<\/li>\n<li>\n<p>\u0441 \u2013 <strong><em>\u043f\u0440\u0438\u0440\u0430\u0449\u0435\u043d\u0438\u0435<\/em><\/strong> (increment);<\/p>\n<\/li>\n<li>\n<p>x<sub>0<\/sub> \u2013 <strong><em>\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435<\/em><\/strong> (seed).<\/p>\n<\/li>\n<\/ul>\n<p>\u0421\u0430\u043c\u0430 \u0444\u043e\u0440\u043c\u0443\u043b\u0430, \u043f\u043e \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0432\u044b\u0447\u0438\u0441\u043b\u044f\u044e\u0442\u0441\u044f \u043f\u0441\u0435\u0432\u0434\u043e\u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u0435 \u0447\u0438\u0441\u043b\u0430, \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0442\u0430\u043a: <\/p>\n<p><code>x<sub>1<\/sub> = (x<sub>0<\/sub> * a + c ) MOD m.<\/code><\/p>\n<p>\u0422\u043e \u0435\u0441\u0442\u044c, \u043c\u044b \u043d\u0430\u0445\u043e\u0434\u0438\u043c \u043e\u0441\u0442\u0430\u0442\u043e\u043a \u043f\u0440\u0438 \u0446\u0435\u043b\u043e\u0447\u0438\u0441\u043b\u0435\u043d\u043d\u043e\u043c \u0434\u0435\u043b\u0435\u043d\u0438\u0438 \u0447\u0438\u0441\u043b\u0430 (x<sub>0<\/sub> * a + c) \u043d\u0430 m . \u042d\u0442\u043e\u0442 \u043e\u0441\u0442\u0430\u0442\u043e\u043a \u0438 \u0435\u0441\u0442\u044c \u043d\u0430\u0448\u0435 \u043f\u0441\u0435\u0432\u0434\u043e\u0441\u043b\u0443\u0447\u0430\u0439\u043d\u043e\u0435 \u0447\u0438\u0441\u043b\u043e. \u0414\u0430\u043b\u0435\u0435 \u043c\u044b \u0441\u0442\u0430\u0432\u0438\u043c \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u043d\u044b\u0439 x<sub>1 <\/sub>\u043d\u0430 \u043c\u0435\u0441\u0442\u043e x<sub>0 <\/sub>\u0438 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0432\u0442\u043e\u0440\u043e\u0435 \u0447\u0438\u0441\u043b\u043e \u0432 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438. \u0422\u0435\u043e\u0440\u0435\u0442\u0438\u0447\u0435\u0441\u043a\u0438, \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u043f\u043e\u0432\u0442\u043e\u0440\u044f\u0442\u044c \u043f\u043e\u0434\u043e\u0431\u043d\u0443\u044e \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u044e \u0432\u043f\u043b\u043e\u0442\u044c \u0434\u043e \u0431\u0435\u0441\u043a\u043e\u043d\u0435\u0447\u043d\u043e\u0441\u0442\u0438, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u0430\u044f \u0434\u043b\u0438\u043d\u0430 \u0442\u0430\u043a\u043e\u0439 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u0440\u0430\u0432\u043d\u044f\u0435\u0442\u0441\u044f \u0434\u0435\u043b\u0438\u0442\u0435\u043b\u044e. <\/p>\n<p>\u042d\u0442\u043e \u0437\u043d\u0430\u0447\u0438\u0442, \u0447\u0442\u043e \u0435\u0441\u043b\u0438 \u043c\u044b \u0432\u043e\u0437\u044c\u043c\u0435\u043c \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e \u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u0434\u0435\u043b\u0438\u0442\u0435\u043b\u044c, \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e \u0431\u043e\u043b\u044c\u0448\u0443\u044e \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u0445 \u0447\u0438\u0441\u0435\u043b. \u042d\u0442\u043e \u043f\u043e\u043d\u044f\u0442\u043d\u043e, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u0435\u0441\u043b\u0438 \u0443 \u043d\u0430\u0441 \u0435\u0441\u0442\u044c \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0439 \u0446\u0435\u043b\u044b\u0439 \u0434\u0435\u043b\u0438\u0442\u0435\u043b\u044c, \u0442\u043e \u0442\u0435\u043e\u0440\u0435\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e\u043c \u043e\u0441\u0442\u0430\u0442\u043a\u043e\u0432, \u0440\u0430\u0432\u043d\u044b\u043c \u0441\u0430\u043c\u043e\u043c\u0443 \u043c\u043e\u0434\u0443\u043b\u044e. \u0410 \u0435\u0441\u043b\u0438 \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0441\u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0441\u0442\u0430\u0442\u043a\u043e\u0432, \u0442\u043e \u0432\u0441\u0435 \u043e\u043d\u0438 \u043c\u043e\u0433\u0443\u0442 \u0440\u0430\u043d\u043e \u0438\u043b\u0438 \u043f\u043e\u0437\u0434\u043d\u043e \u043f\u0440\u0438\u0441\u0443\u0442\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u043d\u0430 \u043c\u0435\u0441\u0442\u0435 x<sub>0<\/sub>. <\/p>\n<p>\u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0447\u0438\u0441\u043b\u043e 100 \u0434\u0430\u0451\u0442 100 \u043e\u0441\u0442\u0430\u0442\u043a\u043e\u0432 \u043e\u0442 0 \u0434\u043e 99 (\u043e\u0441\u0442\u0430\u0442\u043e\u043a 100 \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043d\u0438\u043a\u0430\u043a \u043d\u0435 \u0441\u043c\u043e\u0436\u0435\u043c, \u043d\u0430\u0434\u0435\u044e\u0441\u044c, \u0447\u0442\u043e \u044d\u0442\u043e \u0432\u043f\u043e\u043b\u043d\u0435 \u043e\u0447\u0435\u0432\u0438\u0434\u043d\u043e). \u0421\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u0435\u0441\u043b\u0438 \u0434\u0435\u043b\u0438\u0442\u0435\u043b\u044c \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0432\u0435\u043d 100, \u0442\u043e \u0438 \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u0430\u044f \u0434\u043b\u0438\u043d\u0430 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0432\u043d\u0430 100. \u0415\u0441\u043b\u0438 \u0434\u043b\u0438\u043d\u0430 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u0432 \u044d\u0442\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0443 \u043d\u0430\u0441 \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0432\u043d\u0430 100, \u0442\u043e 101-\u0439 \u0435\u0435 \u0447\u043b\u0435\u043d \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0432\u0435\u043d \u043f\u0435\u0440\u0432\u043e\u043c\u0443, 102-\u0439 \u2013 \u0432\u0442\u043e\u0440\u043e\u043c\u0443, \u0438 \u0442.\u0434. \u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u043d\u0430\u0447\u0438\u043d\u0430\u044f \u0441\u043e 101-\u0447\u043b\u0435\u043d\u0430, \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043c \u043d\u043e\u0432\u044b\u0439 \u0432\u0438\u0442\u043e\u043a \u0446\u0438\u043a\u043b\u0430, \u0438 \u0442\u0430\u043a \u0434\u043e \u0431\u0435\u0441\u043a\u043e\u043d\u0435\u0447\u043d\u043e\u0441\u0442\u0438. <\/p>\n<p>\u0412 \u0442\u043e \u0436\u0435 \u0432\u0440\u0435\u043c\u044f \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0438 \u043d\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u0443\u044e \u0434\u043b\u0438\u043d\u0443 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u2013 \u0432\u0441\u0435 \u0437\u0430\u0432\u0438\u0441\u0438\u0442 \u043e\u0442 \u0442\u043e\u0433\u043e, \u043d\u0430\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0445\u043e\u0440\u043e\u0448\u043e \u043f\u043e\u0434\u043e\u0431\u0440\u0430\u043d\u044b \u0437\u0430\u0434\u0430\u044e\u0449\u0438\u0435 \u0435\u0435 \u0447\u0438\u0441\u043b\u0430. \u0411\u043e\u043b\u0435\u0435 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e \u043e\u0431\u043e \u0432\u0441\u0435\u0445 \u0442\u043e\u043d\u043a\u043e\u0441\u0442\u044f\u0445 \u0437\u0430\u0434\u0430\u0447\u0438 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0435\u0439 \u043f\u0440\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438 \u041b\u041a\u041c \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c <a href=\"https:\/\/ru.wikipedia.org\/wiki\/%D0%9B%D0%B8%D0%BD%D0%B5%D0%B9%D0%BD%D1%8B%D0%B9_%D0%BA%D0%BE%D0%BD%D0%B3%D1%80%D1%83%D1%8D%D0%BD%D1%82%D0%BD%D1%8B%D0%B9_%D0%BC%D0%B5%D1%82%D0%BE%D0%B4\" rel=\"noopener noreferrer nofollow\">\u0432 \u0442\u043e\u0439 \u0436\u0435 \u0412\u0438\u043a\u0438<\/a>. <\/p>\n<h3>\u041d\u0435\u043c\u043d\u043e\u0433\u043e \u043e \u0442\u0435\u0440\u043c\u0438\u043d\u0430\u0445<\/h3>\n<p>\u0426\u0435\u043b\u043e\u0435 \u0447\u0438\u0441\u043b\u043e a \u043d\u0430\u0437\u044b\u0432\u0430\u044e\u0442 <strong><em>\u0441\u0440\u0430\u0432\u043d\u0438\u043c\u044b\u043c \u043f\u043e \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u043e\u043c\u0443 \u043c\u043e\u0434\u0443\u043b\u044e m<\/em><\/strong> (m \u2013 \u0446\u0435\u043b\u043e\u0435 \u0447\u0438\u0441\u043b\u043e) \u0441 \u0447\u0438\u0441\u043b\u043e\u043c b, \u0432 \u0442\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435, \u0435\u0441\u043b\u0438 \u043f\u0440\u0438 \u0434\u0435\u043b\u0435\u043d\u0438\u0438 \u043d\u0430 m \u043e\u0431\u0430 \u0447\u0438\u0441\u043b\u0430 a \u0438 b \u0434\u0430\u044e\u0442 \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u044b\u0439 \u043e\u0441\u0442\u0430\u0442\u043e\u043a. \u042d\u0442\u043e \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0442\u0430\u043a: <code>a \u2261 \u00a0b (mod m)<\/code>.<\/p>\n<p>\u0418\u0442\u0430\u043a, \u0447\u0438\u0441\u043b\u0430 23 \u0438 103 \u0434\u0430\u044e\u0442 \u043e\u0441\u0442\u0430\u0442\u043e\u043a 3 \u043f\u0440\u0438 \u0434\u0435\u043b\u0435\u043d\u0438\u0438 \u043d\u0430 10, \u0437\u043d\u0430\u0447\u0438\u0442 23 \u0441\u0440\u0430\u0432\u043d\u0438\u043c\u043e \u0441\u043e 103 \u043f\u043e \u043c\u043e\u0434\u0443\u043b\u044e 10 (23 \u2261 \u00a0103 (mod 10)).\u00a0 <\/p>\n<p>\u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u0432 \u0440\u0443\u0441\u0441\u043a\u043e\u044f\u0437\u044b\u0447\u043d\u043e\u0439 \u043c\u0430\u0442\u0435\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u043b\u0438\u0442\u0435\u0440\u0430\u0442\u0443\u0440\u0435 \u0443 \u0442\u0435\u0440\u043c\u0438\u043d\u0430 \u00ab\u043c\u043e\u0434\u0443\u043b\u044c\u00bb \u0435\u0441\u0442\u044c \u0434\u0432\u0430 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f: <\/p>\n<ul>\n<li>\n<p>\u0430\u0431\u0441\u043e\u043b\u044e\u0442\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0447\u0438\u0441\u043b\u0430;    <\/p>\n<\/li>\n<li>\n<p>\u0434\u0435\u043b\u0438\u0442\u0435\u043b\u044c \u0432 \u0430\u0440\u0438\u0444\u043c\u0435\u0442\u0438\u043a\u0435 \u043e\u0441\u0442\u0430\u0442\u043a\u043e\u0432.     <\/p>\n<\/li>\n<\/ul>\n<p>\u041c\u043d\u0435 \u043d\u0435 \u044f\u0441\u043d\u043e, \u043f\u043e\u0447\u0435\u043c\u0443 \u0430\u0431\u0441\u043e\u043b\u044e\u0442\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0443 \u043d\u0430\u0441 \u043d\u0430\u0437\u044b\u0432\u0430\u044e\u0442 \u00ab\u043c\u043e\u0434\u0443\u043b\u0435\u043c\u00bb. \u0412 \u0442\u043e\u0439 \u0436\u0435 \u0430\u043d\u0433\u043b\u043e\u044f\u0437\u044b\u0447\u043d\u043e\u0439 \u043b\u0438\u0442\u0435\u0440\u0430\u0442\u0443\u0440\u0435 \u0430\u0431\u0441\u043e\u043b\u044e\u0442\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0442\u0430\u043a \u0438 \u043f\u0435\u0440\u0435\u0434\u0430\u0435\u0442\u0441\u044f \u2013 <em>absolute [value]<\/em>. \u0415\u0441\u043b\u0438 \u0443 \u043a\u043e\u0433\u043e-\u043b\u0438\u0431\u043e \u0438\u0437 \u0443\u0432\u0430\u0436\u0430\u0435\u043c\u044b\u0445 \u0447\u0438\u0442\u0430\u0442\u0435\u043b\u0435\u0439 \u0435\u0441\u0442\u044c \u043e\u0442\u0432\u0435\u0442 \u043d\u0430 \u0442\u043e, \u043f\u043e\u0447\u0435\u043c\u0443 \u0440\u0443\u0441\u0441\u043a\u043e\u044f\u0437\u044b\u0447\u043d\u044b\u0439 \u0442\u0435\u0440\u043c\u0438\u043d \u00ab\u043c\u043e\u0434\u0443\u043b\u044c\u00bb \u0438\u043c\u0435\u0435\u0442 \u043a\u0430\u043a \u043c\u0438\u043d\u0438\u043c\u0443\u043c \u0434\u0432\u0430 \u043c\u0430\u0442\u0435\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f, \u0442\u043e \u0435\u0433\u043e \u0432\u0441\u0435\u0433\u0434\u0430 \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0432\u043d\u0438\u0437\u0443 \u0432 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u044f\u0445 \u2013 \u043d\u0435 \u0441\u0442\u0435\u0441\u043d\u044f\u0439\u0442\u0435\u0441\u044c. <\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043f\u0435\u0440\u0435\u0439\u0434\u0435\u043c \u043a \u0432\u043e\u043f\u0440\u043e\u0441\u0443 \u043e \u0442\u043e\u043c, \u043f\u043e\u0447\u0435\u043c\u0443 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043a\u043e\u043d\u0433\u0440\u0443\u044d\u043d\u0442\u043d\u044b\u043c. \u0421\u0430\u043c\u043e \u043f\u043e\u043d\u044f\u0442\u0438\u0435 \u043a\u043e\u043d\u0433\u0440\u0443\u044d\u043d\u0442\u043d\u043e\u0441\u0442\u0438 \u0432\u0435\u0441\u044c\u043c\u0430 \u0438 \u0432\u0435\u0441\u044c\u043c\u0430 \u043c\u043d\u043e\u0433\u043e\u0437\u043d\u0430\u0447\u043d\u043e\u0435, \u0441\u0432\u043e\u0451 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u044d\u0442\u043e\u0442 \u0442\u0435\u0440\u043c\u0438\u043d \u0438\u043c\u0435\u0435\u0442 \u0438 \u0432 \u0430\u043d\u0430\u0442\u043e\u043c\u0438\u0438, \u0438 \u0432 \u043f\u0441\u0438\u0445\u043e\u043b\u043e\u0433\u0438\u0438. \u041d\u043e \u0435\u0441\u043b\u0438 \u0432\u0437\u044f\u0442\u044c \u0441\u0444\u0435\u0440\u0443, \u0431\u043e\u043b\u0435\u0435 \u0431\u043b\u0438\u0437\u043a\u0443\u044e \u043a \u0442\u0435\u043c\u0435 \u0434\u0430\u043d\u043d\u043e\u0433\u043e \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u044f, \u0442\u043e \u0432 \u043c\u0430\u0442\u0435\u043c\u0430\u0442\u0438\u043a\u0435 \u043f\u043e\u043d\u044f\u0442\u0438\u0435 \u043a\u043e\u043d\u0433\u0440\u0443\u044d\u043d\u0442\u043d\u043e\u0441\u0442\u0438 \u043c\u043e\u0436\u043d\u043e \u0432\u0441\u0442\u0440\u0435\u0442\u0438\u0442\u044c \u0432 \u0433\u0435\u043e\u043c\u0435\u0442\u0440\u0438\u0438. \u041a\u0430\u043a \u0433\u043e\u0432\u043e\u0440\u0438\u0442 \u0432\u0441\u044f \u0442\u0430 \u0436\u0435 \u0412\u0438\u043a\u0438, <strong><em>\u043a\u043e\u043d\u0433\u0440\u0443\u044d\u043d\u0442\u043d\u043e\u0441\u0442\u044c<\/em><\/strong> \u2013 \u044d\u0442\u043e \u043e\u0442\u043d\u043e\u0448\u0435\u043d\u0438\u0435 \u044d\u043a\u0432\u0438\u0432\u0430\u043b\u0435\u043d\u0442\u043d\u043e\u0441\u0442\u0438 \u043d\u0430 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u0435 \u0433\u0435\u043e\u043c\u0435\u0442\u0440\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0444\u0438\u0433\u0443\u0440. \u041a\u0430\u043a, \u044f \u043d\u0430\u0434\u0435\u044e\u0441\u044c, \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u043e, \u0447\u0438\u0442\u0430\u0442\u0435\u043b\u044f\u043c, \u0441\u0438\u043c\u0432\u043e\u043b &#171;\u2261&#187; \u0442\u0430\u043a\u0436\u0435 \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442 \u044d\u043a\u0432\u0438\u0432\u0430\u043b\u0435\u043d\u0442\u043d\u043e\u0441\u0442\u044c. <\/p>\n<p>\u0412 \u0434\u0430\u043d\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0433\u0435\u043e\u043c\u0435\u0442\u0440\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0442\u0435\u0440\u043c\u0438\u043d\u0430 \u0438\u043c\u0435\u0435\u0442 \u0434\u043b\u044f \u043d\u0430\u0441 \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u0442\u0443 \u0436\u0435 \u0446\u0435\u043d\u043d\u043e\u0441\u0442\u044c, \u0447\u0442\u043e \u0438 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u043a\u043e\u043d\u0433\u0440\u0443\u044d\u043d\u0442\u043d\u043e\u0441\u0442\u0438 \u0432 \u043f\u0441\u0438\u0445\u043e\u043b\u043e\u0433\u0438\u0438. \u0414\u0430, \u0440\u0435\u0447\u044c \u0438\u0434\u0435\u0442 \u043e \u043d\u0435\u043a\u043e\u0435\u043c \u043e\u0442\u043d\u043e\u0448\u0435\u043d\u0438\u0438 \u044d\u043a\u0432\u0438\u0432\u0430\u043b\u0435\u043d\u0442\u043d\u043e\u0441\u0442\u0438, \u043d\u043e \u043d\u0435 \u0431\u043e\u043b\u0435\u0435 \u0442\u043e\u0433\u043e\u2026 \u0411\u043e\u043b\u0435\u0435 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0442\u0438\u0432\u043d\u043e\u0439 \u0431\u0443\u0434\u0435\u0442 <a href=\"https:\/\/ru.wikipedia.org\/wiki\/%D0%9A%D0%BE%D0%BD%D0%B3%D1%80%D1%83%D1%8D%D0%BD%D1%86%D0%B8%D1%8F\" rel=\"noopener noreferrer nofollow\">\u0441\u0442\u0430\u0442\u044c\u044f<\/a>, \u0440\u0430\u0441\u043a\u0440\u044b\u0432\u0430\u044e\u0449\u0430\u044f \u043f\u043e\u043d\u044f\u0442\u0438\u0435 \u00ab\u043a\u043e\u043d\u0433\u0440\u0443\u044d\u043d\u0446\u0438\u044f\u00bb. <\/p>\n<p>\u0418\u0442\u0430\u043a, \u043c\u043e\u0436\u043d\u043e \u0441\u043a\u0430\u0437\u0430\u0442\u044c, \u0447\u0442\u043e \u0441\u0430\u043c\u044b\u043c \u0447\u0430\u0441\u0442\u043e \u043f\u0440\u0438\u0432\u043e\u0434\u044f\u0449\u0438\u043c\u0441\u044f \u0432 \u043f\u0440\u0438\u043c\u0435\u0440\u043e\u043c \u043e\u0442\u043d\u043e\u0448\u0435\u043d\u0438\u044f \u044d\u043a\u0432\u0438\u0432\u0430\u043b\u0435\u043d\u0442\u043d\u043e\u0441\u0442\u0438 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0441\u0440\u0430\u0432\u043d\u0438\u043c\u043e\u0441\u0442\u044c \u0434\u0432\u0443\u0445 \u0447\u0438\u0441\u0435\u043b \u043f\u043e \u043c\u043e\u0434\u0443\u043b\u044e. \u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u0441\u0440\u0430\u0432\u043d\u0438\u043c\u043e\u0441\u0442\u044c \u043f\u043e \u043c\u043e\u0434\u0443\u043b\u044e \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0447\u0430\u0441\u0442\u043d\u044b\u043c \u0441\u043b\u0443\u0447\u0430\u0435\u043c \u0442\u0430\u043a\u043e\u0433\u043e \u043e\u0442\u043d\u043e\u0448\u0435\u043d\u0438\u044f. \u0412\u043e\u0442 \u044d\u0442\u043e \u0443\u0436\u0435 \u043d\u0430\u043c\u043d\u043e\u0433\u043e \u0431\u043b\u0438\u0436\u0435 \u0438 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0442\u0438\u0432\u043d\u0435\u0435. \u0412 \u0430\u043d\u0433\u043b\u0438\u0439\u0441\u043a\u043e\u043c \u044f\u0437\u044b\u043a\u0435 \u0432\u0441\u0435 \u0435\u0449\u0435 \u0431\u043e\u043b\u0435\u0435 \u043f\u0440\u043e\u0437\u0440\u0430\u0447\u043d\u0435\u0435, \u0444\u0440\u0430\u0437\u0430 \u00aba \u0438 b \u0441\u0440\u0430\u0432\u043d\u0438\u043c\u044b \u043f\u043e \u043c\u043e\u0434\u0443\u043b\u044e m\u00bb \u0442\u0430\u043a \u0438 \u0437\u0432\u0443\u0447\u0438\u0442: <em>a and b are congruent modulo m<\/em>. \u00a0<\/p>\n<p>\u0422\u0430\u043a \u043f\u043e\u0447\u0435\u043c\u0443 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u0438\u043c\u0435\u043d\u043d\u043e \u043a\u043e\u043d\u0433\u0440\u0443\u044d\u043d\u0442\u043d\u044b\u0439? \u0410 \u0432\u0441\u0451 \u0434\u0435\u043b\u043e \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u043f\u0440\u0438 \u0435\u0433\u043e \u0440\u0430\u0431\u043e\u0442\u0435 \u0432\u044b\u0447\u0438\u0441\u043b\u044f\u044e\u0442\u0441\u044f \u0434\u0432\u0430 \u0447\u0438\u0441\u043b\u0430, \u0441\u0440\u0430\u0432\u043d\u0438\u043c\u044b\u0435 \u043f\u043e \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u043e\u043c\u0443 \u043c\u043e\u0434\u0443\u043b\u044e. \u00a0\u00a0<\/p>\n<p>\u041f\u0435\u0440\u0432\u043e\u0435 \u0447\u0438\u0441\u043b\u043e \u2013 \u044d\u0442\u043e \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u0432 \u0441\u043a\u043e\u0431\u043a\u0430\u0445: (x<sub>0<\/sub> * a + c ). \u0412\u0442\u043e\u0440\u043e\u0435 \u0447\u0438\u0441\u043b\u043e (x<sub>1<\/sub>) \u2013 \u044d\u0442\u043e \u043e\u0441\u0442\u0430\u0442\u043e\u043a \u043e\u0442 \u0434\u0435\u043b\u0435\u043d\u0438\u044f \u043f\u0435\u0440\u0432\u043e\u0433\u043e \u0447\u0438\u0441\u043b\u0430 \u043d\u0430 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u043e\u0434\u0443\u043b\u044c: <\/p>\n<p><code>x1 = (x0 * a + c ) MOD m.<\/code><\/p>\n<p>\u0422\u043e \u0435\u0441\u0442\u044c, \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c: <code>(x<sub>0<\/sub>*a + c ) \u2261 ((x<sub>0<\/sub>*a + c ) MOD m) (mod m)<\/code>, <br \/>\u0433\u0434\u0435 <code>MOD m<\/code> \u2013 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u044f \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u043e\u0441\u0442\u0430\u0442\u043a\u0430 \u0434\u0435\u043b\u0435\u043d\u0438\u0438 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0446\u0435\u043b\u043e\u0433\u043e \u0447\u0438\u0441\u043b\u0430 \u043d\u0430 \u0446\u0435\u043b\u043e\u0435 \u0447\u0438\u0441\u043b\u043e m (\u0446\u0435\u043b\u043e\u0447\u0438\u0441\u043b\u0435\u043d\u043d\u043e\u0435 \u0434\u0435\u043b\u0435\u043d\u0438\u0435).\u00a0\u00a0 \u00a0<\/p>\n<h3>\u041b\u041a\u041c \u0432 VBA Excel<\/h3>\n<p>\u0418\u0442\u0430\u043a, \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u0432\u0448\u0438\u0441\u044c \u0441 \u0442\u0435\u043e\u0440\u0438\u0435\u0439 \u0438 \u0442\u0435\u0440\u043c\u0438\u043d\u043e\u043b\u043e\u0433\u0438\u0435\u0439, \u043c\u043e\u0436\u043d\u043e \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u0442\u044c \u043a \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0435. \u0421\u043e\u0433\u043b\u0430\u0441\u043d\u043e \u0412\u0438\u043a\u0438, \u0432 VBA \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u0441\u043e \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c\u0438 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430\u043c\u0438:<br \/><strong><em>\u0430<\/em><\/strong> (\u043c\u043d\u043e\u0436\u0438\u0442\u0435\u043b\u044c) \u2013 1140671485 (43FD43FD<sub>16<\/sub>);<br \/><strong><em>\u0441<\/em><\/strong> (\u043f\u0440\u0438\u0440\u0430\u0449\u0435\u043d\u0438\u0435) \u2013 12820163 (C39EC3<sub>16<\/sub>);<br \/><strong><em>m<\/em><\/strong> (\u043c\u043e\u0434\u0443\u043b\u044c) \u2013 2<sup>24<\/sup> (16777216 \u0438\u043b\u0438 1000000<sub>16<\/sub>).<\/p>\n<p>\u0414\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u0438\u0437\u0431\u0435\u0436\u0430\u0442\u044c \u043d\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u0441\u0442\u0438, \u0441\u043a\u0430\u0436\u0443, \u0447\u0442\u043e \u0447\u0438\u0441\u043b\u0430, \u0437\u0430\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0435 &#171;\u043a\u0430\u043a \u0435\u0441\u0442\u044c&#187; \u0431\u0435\u0437 \u0432\u0441\u044f\u043a\u0438\u0445 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u043f\u043e\u0441\u0442\u0444\u0438\u043a\u0441\u043e\u0432 &#8212; \u0432\u0441\u0435\u0433\u0434\u0430 \u0431\u0443\u0434\u0443\u0442 \u043e\u0437\u043d\u0430\u0447\u0430\u0442\u044c \u0447\u0438\u0441\u043b\u0430 \u0432 \u0434\u0435\u0441\u044f\u0442\u0438\u0447\u043d\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u0435 \u0441\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f. \u0410 \u0447\u0438\u0441\u043b\u0430 \u0441 \u043f\u043e\u0441\u0442\u0444\u0438\u043a\u0441\u043e\u043c <sub>16<\/sub> \u0431\u0443\u0434\u0443\u0442 \u043e\u0437\u043d\u0430\u0447\u0430\u0442\u044c \u0447\u0438\u0441\u043b\u0430 \u0432 16-\u0440\u0438\u0447\u043d\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u0435 \u0441\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f. \u0415\u0441\u043b\u0438 \u043a\u0442\u043e-\u0442\u043e \u043f\u0440\u0435\u0434\u043f\u043e\u0447\u0438\u0442\u0430\u0435\u0442 \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c <sub>hex<\/sub>, \u043f\u0440\u043e\u0448\u0443 \u0441\u0438\u043b\u044c\u043d\u043e \u043d\u0435 \u0440\u0443\u0433\u0430\u0442\u044c\u0441\u044f&#8230;  <\/p>\n<p>\u0410 \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a \u044d\u0442\u0438\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u2013 \u0441\u0442\u0430\u0440\u0430\u044f \u043d\u044b\u043d\u0435 \u043d\u0435\u0434\u043e\u0441\u0442\u0443\u043f\u043d\u0430\u044f \u0441\u043f\u0440\u0430\u0432\u043a\u0430 Microsoft, \u043a\u043e\u043f\u0438\u044f \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u0430 \u0432 <a href=\"https:\/\/web.archive.org\/web\/20110417000838\/http:\/\/support.microsoft.com\/kb\/231847\" rel=\"noopener noreferrer nofollow\">\u0446\u0438\u0444\u0440\u043e\u0432\u043e\u043c \u0430\u0440\u0445\u0438\u0432\u0435<\/a>.<\/p>\n<p>\u041e\u0442\u0442\u0443\u0434\u0430 \u0436\u0435 \u043c\u044b \u0431\u0435\u0440\u0435\u043c \u0438 \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 <strong><em>x<sub>0<\/sub><\/em><\/strong> \u2013 327680 (5000<sub>16<\/sub>). <\/p>\n<p>\u0412 \u0442\u043e \u0436\u0435 \u0432\u0440\u0435\u043c\u044f \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0434\u0440\u0443\u0433\u0438\u0435 \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u0438 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, <a href=\"https:\/\/en.wikibooks.org\/wiki\/Visual_Basic_for_Applications\/A_PRNG_for_VBA\" rel=\"noopener noreferrer nofollow\">\u044d\u0442\u043e\u0442<\/a>) \u0434\u0430\u044e\u0442 \u0434\u0440\u0443\u0433\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043c\u043d\u043e\u0436\u0438\u0442\u0435\u043b\u044f: 16598013 (FD43FD<sub>16<\/sub>).<\/p>\n<p>\u0421\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u044f \u044d\u0442\u0438 \u0434\u0432\u0430 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u2013 1140671485 (43FD43FD<sub>16<\/sub>) \u0438 16598013 (FD43FD<sub>16<\/sub>) \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u043c\u0435\u0442\u0438\u0442\u044c, \u0447\u0442\u043e \u0432 16-\u0440\u0438\u0447\u043d\u043e\u043c \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0438 \u043e\u0431\u0430 \u044d\u0442\u0438 \u0447\u0438\u0441\u043b\u0430 \u0438\u043c\u0435\u044e\u0442 \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u044b\u0435 6 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0445 \u0440\u0430\u0437\u0440\u044f\u0434\u043e\u0432. \u041f\u0440\u0438 \u044d\u0442\u043e\u043c \u043e\u0431\u0430 \u043e\u043d\u0438 \u0434\u0430\u0434\u0443\u0442 \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u044b\u0439 \u043e\u0441\u0442\u0430\u0442\u043e\u043a \u043f\u0440\u0438 \u0434\u0435\u043b\u0435\u043d\u0438\u0438 \u043d\u0430 2<sup>24<\/sup> (1000000<sub>16<\/sub>). <\/p>\n<p>\u0412 16-\u0440\u0438\u0447\u043d\u043e\u043c \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0438 \u044d\u0442\u043e \u0432\u0438\u0434\u043d\u043e \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u043d\u0430\u0433\u043b\u044f\u0434\u043d\u043e. \u041f\u043e\u043d\u044f\u0442\u043d\u043e, \u0447\u0442\u043e 16598013 \u043f\u0440\u0438 \u0434\u0435\u043b\u0435\u043d\u0438\u0438 \u043d\u0430 16777216 \u0434\u0430\u0441\u0442 \u043e\u0441\u0442\u0430\u0442\u043e\u043a 16598013 (FD43FD<sub>16<\/sub>). \u041d\u043e \u0438 43FD43FD<sub>16 <\/sub>\u043f\u0440\u0438 \u0434\u0435\u043b\u0435\u043d\u0438\u0438 \u043d\u0430 1000000<sub>16\u00a0 <\/sub>\u0434\u0430\u0441\u0442 \u0442\u0430\u043a\u043e\u0439 \u0436\u0435 \u043e\u0441\u0442\u0430\u0442\u043e\u043a (FD43FD<sub>16<\/sub>). \u0414\u043b\u044f \u043d\u0430\u0438\u043b\u0443\u0447\u0448\u0435\u0433\u043e \u043f\u043e\u043d\u0438\u043c\u0430\u043d\u0438\u044f: <\/p>\n<p><code>43FD43FD<sub>16 <\/sub>= 43<sub>16<\/sub>*1000000<sub>16<\/sub> + FD43FD<sub>16<\/sub><\/code>.<\/p>\n<p>\u0421\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u043f\u043e \u043f\u0440\u0430\u0432\u0438\u043b\u0430\u043c \u043c\u043e\u0434\u0443\u043b\u044c\u043d\u043e\u0439 \u0430\u0440\u0438\u0444\u043c\u0435\u0442\u0438\u043a\u0438 \u043e\u0431\u0430 \u0447\u0438\u0441\u043b\u0430 (\u0438 1140671485, \u0438 16598013) \u043c\u043e\u0433\u0443\u0442 \u0441 \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u044b\u043c \u0443\u0441\u043f\u0435\u0445\u043e\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0432 \u0443\u0436\u0435 \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u043e\u043c \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0435 VBA. \u0422\u043e \u0435\u0441\u0442\u044c, \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043c\u043d\u043e\u0436\u0438\u0442\u0435\u043b\u044f \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0441\u0440\u0430\u0432\u043d\u0438\u043c\u044b\u0435 \u043f\u043e \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u043e\u043c\u0443 \u043c\u043e\u0434\u0443\u043b\u044e \u0447\u0438\u0441\u043b\u0430 (\u0432 \u0434\u0430\u043d\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043e\u043d\u0438 \u0431\u0443\u0434\u0443\u0442 \u044d\u043a\u0432\u0438\u0432\u0430\u043b\u0435\u043d\u0442\u043d\u044b), \u0438 \u043e\u0431\u0430 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u0434\u0430\u0434\u0443\u0442 \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u043d\u043e\u0433\u043e \u043e\u0441\u0442\u0430\u0442\u043a\u0430. \u0422\u0435\u043e\u0440\u0435\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u0434\u043e\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c\u0441\u0442\u0432\u043e \u044d\u0442\u043e\u0433\u043e \u0444\u0430\u043a\u0442\u0430 \u044f \u043e\u0441\u0442\u0430\u0432\u043b\u044e \u0432\u043d\u0435 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0430 \u0434\u0430\u043d\u043d\u043e\u0439 \u0440\u0430\u0431\u043e\u0442\u044b. \u041f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0436\u0435 \u0432 \u044d\u0442\u043e\u043c \u043c\u043e\u0436\u0435\u0442 \u0443\u0431\u0435\u0434\u0438\u0442\u044c\u0441\u044f \u043a\u0430\u0436\u0434\u044b\u0439. \u042d\u0442\u043e \u043c\u043e\u0436\u0435\u0442 \u043b\u0435\u0433\u043a\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u043a\u0430\u0436\u0434\u044b\u0439, \u043f\u043e\u0434\u0441\u0442\u0430\u0432\u0438\u0432 \u0432 \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u0439 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u043e\u0431\u0430 \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u043d\u044b\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f.<\/p>\n<p>\u0422\u043e \u0435\u0441\u0442\u044c,<br \/><code>(327680*1140671485 + 12820163) MOD 16777216<\/code><br \/> \u0434\u0430\u0441\u0442 \u0442\u0430\u043a\u043e\u0439 \u0436\u0435 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442, \u0447\u0442\u043e \u0438<em><br \/><\/em><code><em>(327680*<\/em>16598013 + 12820163) MOD 16777216.<\/code><\/p>\n<p>\u041a\u0430\u0441\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u0442\u043e\u0433\u043e, \u043f\u043e\u0447\u0435\u043c\u0443 \u0432 \u0440\u0430\u0437\u043d\u044b\u0445 \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u0430\u0445 \u0444\u0438\u0433\u0443\u0440\u0438\u0440\u0443\u0435\u0442 \u0434\u0432\u0430 \u0440\u0430\u0437\u043d\u044b\u0445 \u0447\u0438\u0441\u043b\u0430 \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043c\u043d\u043e\u0436\u0438\u0442\u0435\u043b\u044f, \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u043e\u0436\u0438\u0442\u044c, \u0447\u0442\u043e \u0447\u0438\u0441\u043b\u043e 16 598\u00a0013 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u043e\u0441\u044c \u043d\u0430 \u0441\u0442\u0430\u0440\u044b\u0445 32-\u0440\u0430\u0437\u0440\u044f\u0434\u043d\u044b\u0445 \u0441\u0438\u0441\u0442\u0435\u043c\u0430\u0445 \u0434\u043e \u0432\u0435\u0440\u0441\u0438\u0438 VB 6.0 \u0432\u043a\u043b\u044e\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e (\u0432 \u043a\u043b\u0430\u0441\u0441\u0438\u0447\u0435\u0441\u043a\u043e\u043c VBA), \u0430 \u0447\u0438\u0441\u043b\u043e 1 140 671 485, \u0441\u043a\u043e\u0440\u0435\u0435 \u0432\u0441\u0435\u0433\u043e, \u0441\u0442\u0430\u043b\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0443\u0436\u0435 \u043d\u0430 64-\u0440\u0430\u0437\u0440\u044f\u0434\u043d\u044b\u0445 \u0441\u0438\u0441\u0442\u0435\u043c\u0430\u0445 \u0438 \u0432 VBA \u043d\u0430\u0447\u0438\u043d\u0430\u044f \u0441 7-\u0439 \u0432\u0435\u0440\u0441\u0438\u0438 (VB. NET). \u00a0\u00a0\u00a0<\/p>\n<p>\u041d\u043e, \u043a\u0430\u043a \u0443\u0436\u0435 \u0431\u044b\u043b\u043e \u043f\u043e\u043a\u0430\u0437\u0430\u043d\u043e, \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u043e\u0441\u043d\u043e\u0432\u0430\u043d\u0438\u0439 \u0434\u043b\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0431<strong><em>\u043e<\/em><\/strong>\u043b\u044c\u0448\u0435\u0433\u043e \u0447\u0438\u0441\u043b\u0430 \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043c\u043d\u043e\u0436\u0438\u0442\u0435\u043b\u044f, \u043d\u0430 \u043f\u0435\u0440\u0432\u044b\u0439 \u0432\u0437\u0433\u043b\u044f\u0434 \u043d\u0435\u0442. \u041e\u0431\u0430 \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u0445 \u043c\u043d\u043e\u0436\u0438\u0442\u0435\u043b\u044f \u0434\u0430\u044e\u0442 \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u044b\u0439 \u043e\u0441\u0442\u0430\u0442\u043e\u043a \u043f\u0440\u0438 \u0440\u0430\u0431\u043e\u0442\u0435 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430, \u043d\u043e \u043f\u0440\u0438 \u044d\u0442\u043e\u043c, \u043b\u043e\u0433\u0438\u0447\u043d\u043e \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u043e\u0436\u0438\u0442\u044c, \u0447\u0442\u043e \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u0441 \u0447\u0438\u0441\u043b\u043e\u043c 1140671485 \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u044e\u0442 \u0431\u043e\u043b\u044c\u0448\u0435 \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432. \u041e\u0442\u0432\u0435\u0442\u0430 \u043d\u0430 \u0432\u043e\u043f\u0440\u043e\u0441, \u043f\u043e\u0447\u0435\u043c\u0443 \u0432 Microsoft \u0440\u0435\u0448\u0438\u043b\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0431<strong><em>\u043e<\/em><\/strong>\u043b\u044c\u0448\u0435\u0435 \u0447\u0438\u0441\u043b\u043e, \u0443 \u043c\u0435\u043d\u044f \u043f\u043e\u043a\u0430 \u043d\u0435\u0442. <\/p>\n<p>\u0418\u0442\u0430\u043a, \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0438 \u043f\u0440\u0430\u0432\u0438\u043b\u043e \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u043e\u0441\u0442\u0430\u0442\u043a\u0430, \u0438, \u0442\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u043c\u043e\u0436\u0435\u043c \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u044c \u0432\u0441\u044e \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c. \u0417\u0430\u0431\u0435\u0433\u0430\u044f \u0432\u043f\u0435\u0440\u0435\u0434, \u043d\u0443\u0436\u043d\u043e \u043e\u0442\u043c\u0435\u0442\u0438\u0442\u044c, \u0447\u0442\u043e \u0432 Microsoft \u0432\u0435\u0441\u044c\u043c\u0430 \u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u043f\u043e\u0434\u043e\u0448\u043b\u0438 \u043a \u0432\u044b\u0431\u043e\u0440\u0443 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u0441\u0432\u043e\u0435\u0433\u043e \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430 \u0438 \u043f\u0440\u0438 \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f\u0445 \u043c\u043d\u043e\u0436\u0438\u0442\u0435\u043b\u044f, \u043f\u0440\u0438\u0440\u0430\u0449\u0435\u043d\u0438\u044f \u0438 \u043c\u043e\u0434\u0443\u043b\u044f \u0434\u043b\u0438\u043d\u0430 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u0431\u0443\u0434\u0435\u0442 \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0439 (16777216 \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439, \u0447\u0442\u043e \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044e \u043c\u043e\u0434\u0443\u043b\u044f).\u00a0\u00a0 <\/p>\n<p>\u041d\u043e \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435 \u043e\u0441\u0442\u0430\u0442\u043a\u0430 \u2013 \u044d\u0442\u043e \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u043b\u043e\u0432\u0438\u043d\u0430 \u0434\u0435\u043b\u0430. \u0421\u0430\u043c\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435, \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u043c\u043e\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0435\u0439 Rnd() \u0432\u044b\u0447\u0438\u0441\u043b\u044f\u0435\u0442\u0441\u044f \u0442\u0430\u043a: <br \/><code>rnd = x<sub>1<\/sub>\/m. <\/code><br \/>\u0422\u0430\u043a \u043a\u0430\u043a x<sub>1<\/sub> \u0432\u0441\u0435\u0433\u0434\u0430 \u0431\u0443\u0434\u0435\u0442 \u043c\u0435\u043d\u044c\u0448\u0435 m, \u0442\u043e, \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e, 0 \u2264 rnd &lt; 1.<\/p>\n<p>\u0412 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e\u0439 \u043d\u0430 \u0434\u0430\u043d\u043d\u044b\u0439\u00a0 \u043c\u043e\u043c\u0435\u043d\u0442 <a href=\"https:\/\/learn.microsoft.com\/ru-ru\/office\/vba\/language\/reference\/user-interface-help\/rnd-function\" rel=\"noopener noreferrer nofollow\">\u0441\u043f\u0440\u0430\u0432\u043a\u0435 \u043e\u0442 Microsoft<\/a> \u0431\u0435\u0437 \u0443\u043a\u0430\u0437\u0430\u043d\u0438\u044f \u043a\u0430\u043a\u0438\u0445-\u043b\u0438\u0431\u043e \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e\u0441\u0442\u0435\u0439 \u0433\u043e\u0432\u043e\u0440\u0438\u0442\u0441\u044f, \u0447\u0442\u043e \u0444\u0443\u043d\u043a\u0446\u0438\u044f Rnd() \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0442\u0438\u043f\u0430 <strong>Single <\/strong>(\u0447\u0438\u0441\u043b\u043e \u0441 \u043f\u043b\u0430\u0432\u0430\u044e\u0449\u0435\u0439 \u0442\u043e\u0447\u043a\u043e\u0439 \u0440\u0430\u0437\u043c\u0435\u0440\u043e\u043c 32 \u0431\u0438\u0442\u0430), \u043c\u0435\u043d\u044c\u0448\u0435\u0435 1, \u043d\u043e \u0431\u043e\u043b\u044c\u0448\u0435\u0435 \u0438\u043b\u0438 \u0440\u0430\u0432\u043d\u043e\u0435 \u043d\u0443\u043b\u044e.<\/p>\n<h3>\u041f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f<\/h3>\n<p>\u0418\u0442\u0430\u043a, \u0434\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u043f\u043e\u043f\u0440\u043e\u0431\u0443\u0435\u043c \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0432 \u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440\u0435 VBA \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u043a\u043e\u0434  \u0434\u043b\u044f \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u043f\u0441\u0435\u0432\u0434\u043e\u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u0445 \u0447\u0438\u0441\u0435\u043b:<\/p>\n<pre><code class=\"vbscript\">Dim i As Integer  For i = 1 To 3         Debug.Print Rnd  Next \u2018\u041b\u0438\u0441\u0442\u0438\u043d\u0433 1<\/code><\/pre>\n<p>\u0412 \u0440\u0430\u043c\u043a\u0430\u0445 \u0434\u0430\u043d\u043d\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0438 \u044f \u043d\u0435 \u0431\u0443\u0434\u0443 \u043e\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0442\u044c\u0441\u044f \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e \u043d\u0430 \u0442\u043e\u043c, \u043a\u0430\u043a \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u043c\u0430\u043a\u0440\u043e\u0441\u044b \u043d\u0430 \u044f\u0437\u044b\u043a\u0435 VBA, \u0438 \u043e \u0442\u043e\u043c, \u0447\u0442\u043e \u0442\u0430\u043a\u043e\u0435 \u043f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u044b \u00a0\u2013 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u043e\u0431 \u044d\u0442\u043e\u043c \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0438 \u0442\u043e\u0442, \u043a\u0442\u043e \u0437\u0430\u0445\u043e\u0447\u0435\u0442, \u0432\u0441\u0435\u0433\u0434\u0430 \u0441\u043c\u043e\u0436\u0435\u0442 \u0435\u0435 \u043d\u0430\u0439\u0442\u0438 \u0431\u0435\u0437 \u043a\u0430\u043a\u0438\u0445-\u043b\u0438\u0431\u043e \u043f\u0440\u043e\u0431\u043b\u0435\u043c. \u0414\u043b\u044f \u043a\u0440\u0430\u0442\u043a\u043e\u0441\u0442\u0438 \u0441\u043a\u0430\u0436\u0443 \u0442\u043e\u043b\u044c\u043a\u043e, \u0447\u0442\u043e \u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440 c\u0446\u0435\u043d\u0430\u0440\u0438\u0435\u0432 VBA \u043c\u043e\u0436\u043d\u043e \u043e\u0442\u043a\u0440\u044b\u0442\u044c \u0432 \u043b\u044e\u0431\u043e\u043c \u043e\u0444\u0438\u0441\u043d\u043e\u043c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0438, \u043d\u0430\u0436\u0430\u0432 \u0441\u043e\u0447\u0435\u0442\u0430\u043d\u0438\u0435 \u043a\u043b\u0430\u0432\u0438\u0448 <strong>Alt+F11<\/strong>. <\/p>\n<p>\u0414\u0430\u0434\u0438\u043c \u043a\u0440\u0430\u0442\u043a\u0438\u0439 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0439 \u043a \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u043d\u043e\u043c\u0443 \u0432\u044b\u0448\u0435 \u043b\u0438\u0441\u0442\u0438\u043d\u0433\u0443. \u041c\u044b \u043e\u0431\u044a\u044f\u0432\u0438\u043b\u0438 \u0446\u0435\u043b\u043e\u0447\u0438\u0441\u043b\u0435\u043d\u043d\u0443\u044e \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e <code>i<\/code>, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0441\u0447\u0435\u0442\u0447\u0438\u043a\u043e\u043c \u0446\u0438\u043a\u043b\u0430, \u0438 \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 \u0446\u0438\u043a\u043b\u0430 <code>For<\/code> \u0442\u0440\u0438 \u0440\u0430\u0437\u0430 \u043f\u043e\u0434\u0440\u044f\u0434 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u043b\u0438 \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u0443\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u044e <code>Rnd()<\/code>. \u0417\u0434\u0435\u0441\u044c \u043d\u0443\u0436\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c, \u0447\u0442\u043e \u044d\u0442\u0443 \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u043c\u043e\u0436\u043d\u043e \u0432\u044b\u0437\u0432\u0430\u0442\u044c \u0434\u0432\u043e\u044f\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u0447\u0442\u043e \u043d\u0438\u043a\u0430\u043a \u043d\u0435 \u043e\u0442\u0440\u0430\u0437\u0438\u0442\u0441\u044f \u043d\u0430 \u0435\u0435 \u0440\u0430\u0431\u043e\u0442\u0435: \u0438 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u0435 <code>Rnd()<\/code>, \u0438 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u0435 <code>Rnd<\/code> \u044d\u043a\u0432\u0438\u0432\u0430\u043b\u0435\u043d\u0442\u044b. \u0412\u0441\u0435 \u0437\u0430\u0432\u0438\u0441\u0438\u0442 \u043e\u0442 \u0441\u0442\u0438\u043b\u044f \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u043a\u043e\u0434\u0430 \u2013 \u0435\u0441\u043b\u0438 \u0432\u044b \u0445\u043e\u0442\u0438\u0442\u0435, \u0447\u0442\u043e\u0431\u044b \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0437\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0432\u044b\u0434\u0435\u043b\u044f\u043b\u0438\u0441\u044c \u0432 \u043e\u0431\u0449\u0435\u043c \u043f\u043e\u0442\u043e\u043a\u0435, \u0442\u043e \u0442\u043e\u0433\u0434\u0430 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u0435 <code>Rnd()<\/code> \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u0435\u0434\u043f\u043e\u0447\u0442\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u043c. \u0415\u0441\u043b\u0438 \u0442\u0430\u043a\u043e\u0439 \u0446\u0435\u043b\u0438 \u043d\u0435 \u0441\u0442\u043e\u0438\u0442 \u2013 \u0442\u043e <code>Rnd<\/code>\u00a0 \u043f\u043e\u043c\u043e\u0436\u0435\u0442 \u0441\u043e\u043a\u0440\u0430\u0442\u0438\u0442\u044c \u043a\u043e\u0434. <\/p>\n<p>\u041d\u043e \u043d\u0430\u043c \u043d\u0435 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u0432\u044b\u0437\u0432\u0430\u0442\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u044e, \u043d\u0430\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0443\u0432\u0438\u0434\u0435\u0442\u044c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u0435\u0435 \u0440\u0430\u0431\u043e\u0442\u044b. \u0418 \u044d\u0442\u0438 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0432\u044b\u0432\u043e\u0434\u0438\u0442\u044c \u0432 \u043e\u043a\u043d\u043e \u043e\u0442\u043b\u0430\u0434\u043a\u0438 \u043a\u043e\u0434\u0430 <em>Immediate <\/em>\u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 \u043c\u0435\u0442\u043e\u0434\u0430 <code>Print <\/code>\u043a\u043b\u0430\u0441\u0441\u0430 <code>Debug <\/code>(\u043d\u0435 \u0437\u0430\u0431\u044b\u0432\u0430\u0435\u043c, \u0447\u0442\u043e VBA \u2013 \u043e\u0431\u044a\u0435\u043a\u0442\u043d\u043e-\u043e\u0440\u0438\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u044f\u0437\u044b\u043a). \u0421\u0430\u043c\u043e \u044d\u0442\u043e \u043e\u043a\u043d\u043e \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0432 \u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440\u0435 VBA \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 \u0441\u043e\u0447\u0435\u0442\u0430\u043d\u0438\u044f \u043a\u043b\u0430\u0432\u0438\u0448 <strong>Ctrl+G<\/strong> \u0438\u043b\u0438 \u0447\u0435\u0440\u0435\u0437 \u043e\u043f\u0446\u0438\u044e <strong>Immediate Window<\/strong> \u0432 \u043f\u0443\u043d\u043a\u0442\u0435 \u043c\u0435\u043d\u044e <strong>View<\/strong>. <\/p>\n<figure class=\"\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/89f\/805\/44b\/89f80544b6309a38cb76a9d52275ab69.jpg\" alt=\"\u041e\u0442\u043a\u0440\u044b\u0432\u0430\u0435\u043c \u043e\u043a\u043d\u043e Immediate\" title=\"\u041e\u0442\u043a\u0440\u044b\u0432\u0430\u0435\u043c \u043e\u043a\u043d\u043e Immediate\" width=\"212\" height=\"361\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/89f\/805\/44b\/89f80544b6309a38cb76a9d52275ab69.jpg 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/89f\/805\/44b\/89f80544b6309a38cb76a9d52275ab69.jpg 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<div><figcaption>\u041e\u0442\u043a\u0440\u044b\u0432\u0430\u0435\u043c \u043e\u043a\u043d\u043e Immediate<\/figcaption><\/div>\n<\/figure>\n<div class=\"floating-image\">\n<p>\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u043c \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043a\u043e\u0434\u0430 \u0438\u0437 \u041b\u0438\u0441\u0442\u0438\u043d\u0433\u0430 1 \u0441\u0442\u0430\u043d\u0435\u0442 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0430\u044f \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c: <\/p>\n<\/div>\n<figure class=\"\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/dca\/81e\/a76\/dca81ea76c29a04a2dd0efcd3e880ccf.png\" width=\"79\" height=\"51\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/dca\/81e\/a76\/dca81ea76c29a04a2dd0efcd3e880ccf.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/dca\/81e\/a76\/dca81ea76c29a04a2dd0efcd3e880ccf.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/figure>\n<p>\u0415\u0441\u043b\u0438 \u0436\u0435 \u043c\u044b \u0435\u0449\u0435 \u0440\u0430\u0437 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u043c \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u0439 \u043a\u043e\u0434, \u0442\u043e \u0434\u0430\u043d\u043d\u044b\u0435 \u0432 \u043e\u043a\u043d\u0435 <em>Immediate<\/em> \u0431\u0443\u0434\u0443\u0442 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c: <\/p>\n<figure class=\"\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/28b\/db5\/c20\/28bdb5c20befb0c0848e0021737bfdfe.png\" width=\"87\" height=\"101\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/28b\/db5\/c20\/28bdb5c20befb0c0848e0021737bfdfe.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/28b\/db5\/c20\/28bdb5c20befb0c0848e0021737bfdfe.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/figure>\n<p>\u041a\u0430\u043a \u0432\u0438\u0434\u043d\u043e, \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0438 \u0435\u0449\u0435 3 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430 \u0440\u0430\u0431\u043e\u0442\u044b \u0444\u0443\u043d\u043a\u0446\u0438\u0438 <code>Rnd()<\/code> <\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043f\u0435\u0440\u0435\u0434 \u043d\u0430\u043c\u0438 \u0441\u0442\u043e\u0438\u0442 \u0437\u0430\u0434\u0430\u0447\u0430 \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u044d\u043c\u0443\u043b\u044f\u0442\u043e\u0440 \u0440\u0430\u0431\u043e\u0442\u044b \u0444\u0443\u043d\u043a\u0446\u0438\u0438, \u0434\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435. \u041d\u0435 \u0431\u0443\u0434\u0435\u043c \u0434\u0430\u043b\u0435\u043a\u043e \u0445\u043e\u0434\u0438\u0442\u044c \u0438 \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0442\u0430\u043a\u043e\u0439 \u044d\u043c\u0443\u043b\u044f\u0442\u043e\u0440 \u043d\u0435\u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0432 Excel. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0431\u0443\u0434\u0435\u043c \u0432\u044b\u0447\u0438\u0441\u043b\u044f\u0442\u044c \u0432\u044b\u0447\u0438\u0441\u043b\u044f\u0435\u043c\u044b\u0435 \u043f\u0440\u0438 \u0440\u0430\u0431\u043e\u0442\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 Rnd() \u0434\u0430\u043d\u043d\u044b\u0435, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u0440\u0430\u043d\u0435\u0435 \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b: <br \/><strong>x<sub>0<\/sub><\/strong> = 327680;<br \/><strong>\u0430<\/strong> = 16598013;<br \/><strong>\u0441<\/strong> = 12820163;<br \/><strong>m<\/strong> = 16777216.<\/p>\n<p>\u041e\u0441\u0442\u0430\u0442\u043e\u043a \u0431\u0443\u0434\u0435\u043c \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c \u0432 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u0443\u044e \u044f\u0447\u0435\u0439\u043a\u0443 \u0438 \u0431\u0443\u0434\u0435\u043c \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u044c \u0435\u0433\u043e \u043f\u043e \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u0444\u043e\u0440\u043c\u0443\u043b\u0435: <br \/>=\u041e\u0421\u0422\u0410\u0422(16598013*RC[-1]+12820163;16777216). <\/p>\n<p>\u0421\u0430\u043c\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 Rnd \u043c\u044b \u0432\u044b\u0447\u0438\u0441\u043b\u044f\u0435\u043c \u0432 \u0434\u0440\u0443\u0433\u043e\u0439 \u044f\u0447\u0435\u0439\u043a\u0435 \u043f\u043e \u0444\u043e\u0440\u043c\u0443\u043b\u0435:<br \/> =RC[-1]\/16777216.<\/p>\n<p>\u041f\u043e\u043b\u0443\u0447\u0438\u043c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b: <\/p>\n<figure class=\"\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/6a7\/693\/04b\/6a769304b99744b3fedcb4a74eba0a4d.png\" alt=\"\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0440\u0430\u0431\u043e\u0442\u044b \u044d\u043c\u0443\u043b\u044f\u0442\u043e\u0440\u0430\" title=\"\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0440\u0430\u0431\u043e\u0442\u044b \u044d\u043c\u0443\u043b\u044f\u0442\u043e\u0440\u0430\" width=\"203\" height=\"121\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/6a7\/693\/04b\/6a769304b99744b3fedcb4a74eba0a4d.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/6a7\/693\/04b\/6a769304b99744b3fedcb4a74eba0a4d.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<div><figcaption>\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0440\u0430\u0431\u043e\u0442\u044b \u044d\u043c\u0443\u043b\u044f\u0442\u043e\u0440\u0430<\/figcaption><\/div>\n<\/figure>\n<p>\u041a\u0430\u043a \u0432\u0438\u0434\u043d\u043e, \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0439 \u0432 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0439 \u0438\u0442\u0435\u0440\u0430\u0446\u0438\u0438 \u043e\u0441\u0442\u0430\u0442\u043e\u043a \u0431\u0435\u0440\u0435\u0442\u0441\u044f \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0434\u043b\u044f \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u0438\u0442\u0435\u0440\u0430\u0446\u0438\u0438 \u0440\u0430\u0431\u043e\u0442\u044b \u0444\u0443\u043d\u043a\u0446\u0438\u0438. \u0412 \u0438\u0442\u043e\u0433\u0435 \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0438 \u0442\u0435 \u0436\u0435 \u0441\u0430\u043c\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f, \u0447\u0442\u043e \u0438 \u043f\u0440\u0438 \u0440\u0430\u0431\u043e\u0442\u0435 \u043c\u0430\u043a\u0440\u043e\u0441\u0430, \u0437\u0430\u043f\u0438\u0441\u0430\u043d\u043d\u043e\u0433\u043e \u043d\u0430 \u044f\u0437\u044b\u043a\u0435 VBA. <\/p>\n<h3>\u0415\u0449\u0435 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043d\u044e\u0430\u043d\u0441\u043e\u0432<\/h3>\n<p>\u041c\u043e\u0436\u043d\u043e \u0437\u0430\u043c\u0435\u0442\u0438\u0442\u044c, \u0447\u0442\u043e \u043f\u0440\u0438 \u043a\u0430\u0436\u0434\u043e\u043c \u043d\u043e\u0432\u043e\u043c \u0437\u0430\u043f\u0443\u0441\u043a\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 <code>Rnd<\/code> \u043c\u044b \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u043c \u0432\u044b\u0447\u0438\u0441\u043b\u044f\u0442\u044c \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u043d\u0435 \u0441 \u0441\u0430\u043c\u043e\u0433\u043e \u043d\u0430\u0447\u0430\u043b\u0430: \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 <code>x<sub>0<\/sub><\/code> \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0438\u043c\u0435\u0442\u044c \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0439 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u043d\u044b\u0439 \u043e\u0441\u0442\u0430\u0442\u043e\u043a. \u0415\u0441\u043b\u0438 \u043c\u044b \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u043b\u0438 6 \u0438\u0442\u0435\u0440\u0430\u0446\u0438\u0439 , \u0442\u043e \u043f\u0440\u0438 \u043f\u043e\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u043c \u0437\u0430\u043f\u0443\u0441\u043a\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 <code>Rnd<\/code> \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0432\u043e\u0437\u044c\u043c\u0435\u0442 \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043e\u0441\u0442\u0430\u0442\u043e\u043a, \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u043d\u044b\u0439 \u0432 6-\u0439 \u0438\u0442\u0435\u0440\u0430\u0446\u0438\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432 \u0434\u0430\u043d\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 (\u0447\u0442\u043e \u0432\u0438\u0434\u043d\u043e \u043f\u043e \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430\u043c \u0440\u0430\u0431\u043e\u0442\u044b \u044d\u043c\u0443\u043b\u044f\u0442\u043e\u0440\u0430) \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0432\u0435\u043d 12997982.\u00a0<\/p>\n<p>\u041d\u043e \u0447\u0442\u043e \u0435\u0441\u043b\u0438 \u043d\u0430\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u00ab\u0441\u0431\u0440\u043e\u0441\u0438\u0442\u044c\u00bb \u0441\u0447\u0435\u0442\u0447\u0438\u043a \u0438 \u043d\u0430\u0447\u0430\u0442\u044c \u0432\u0441\u0435 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u0441 \u0441\u0430\u043c\u043e\u0433\u043e \u043d\u0430\u0447\u0430\u043b\u0430? \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0432 \u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440\u0435 VBA \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043d\u0430\u0436\u0430\u0442\u044c \u043d\u0430 \u043a\u043d\u043e\u043f\u043a\u0443 <strong><em>Reset<\/em><\/strong>. <\/p>\n<figure class=\"\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/495\/666\/735\/495666735b4bb0d1acc1a73d028ec9a1.png\" alt=\"\u041a\u043d\u043e\u043f\u043a\u0430 Reset\" title=\"\u041a\u043d\u043e\u043f\u043a\u0430 Reset\" width=\"361\" height=\"107\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/495\/666\/735\/495666735b4bb0d1acc1a73d028ec9a1.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/495\/666\/735\/495666735b4bb0d1acc1a73d028ec9a1.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<div><figcaption>\u041a\u043d\u043e\u043f\u043a\u0430 Reset<\/figcaption><\/div>\n<\/figure>\n<p>\u00a0\u0418\u0442\u0430\u043a, \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u043c \u043a\u043e\u0434 \u0438\u0437 \u041b\u0438\u0441\u0442\u0438\u043d\u0433\u0430 1, \u043d\u0430\u0436\u043c\u0435\u043c \u043d\u0430 \u043a\u043d\u043e\u043f\u043a\u0443 <em>Reset <\/em>\u0438 \u0441\u043d\u043e\u0432\u0430 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u043c \u043d\u0430\u0448 \u043a\u043e\u0434. \u0412 \u0438\u0442\u043e\u0433\u0435 \u0432 \u043e\u043a\u043d\u0435 <em>Immediate<\/em> \u043f\u043e\u043b\u0443\u0447\u0438\u043c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442:<\/p>\n<figure class=\"\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/db9\/605\/3a8\/db96053a8fd8332bddf31ee250b3fbbc.png\" width=\"85\" height=\"97\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/db9\/605\/3a8\/db96053a8fd8332bddf31ee250b3fbbc.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/db9\/605\/3a8\/db96053a8fd8332bddf31ee250b3fbbc.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/figure>\n<p>\u0422\u043e \u0435\u0441\u0442\u044c, \u043a\u043d\u043e\u043f\u043a\u0430 <em>Reset <\/em>\u043f\u0440\u0438\u0432\u043e\u0434\u0438\u0442 \u0441\u0438\u0441\u0442\u0435\u043c\u0443 \u0432 \u0435\u0435 \u0438\u0437\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e\u0435 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435. \u0418 \u0435\u0441\u043b\u0438 \u043d\u0430\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043d\u0430\u0447\u0430\u0442\u044c \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u0441 &#171;\u043d\u0443\u043b\u0435\u0432\u043e\u0439 \u0442\u043e\u0447\u043a\u0438&#187;, \u043d\u0443\u0436\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u043d\u0430\u0436\u0430\u0442\u044c \u0442\u0443 \u0441\u0430\u043c\u0443\u044e \u043a\u043d\u043e\u043f\u043a\u0443. <\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u0441\u043a\u0430\u0437\u0430\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0441\u043b\u043e\u0432 \u043e\u0431 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u0430\u0445 \u0444\u0443\u043d\u043a\u0446\u0438\u0438. \u0414\u043e \u044d\u0442\u043e\u0433\u043e \u043c\u044b \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u043b\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u044e <code>Rnd <\/code>\u0431\u0435\u0437 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u2013 \u0432\u0435\u0440\u043d\u0435\u0435, \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u0430 \u043c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0438 <code>x<sub>0<\/sub><\/code>, \u0432\u0448\u0438\u0442\u044b\u0439 \u0432 \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e. \u0417\u0434\u0440\u0430\u0432\u044b\u0439 \u0441\u043c\u044b\u0441\u043b \u043f\u043e\u0434\u0441\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442, \u0447\u0442\u043e \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0437\u0430\u0434\u0430\u0432\u0430\u0442\u044c \u043b\u044e\u0431\u043e\u0435 \u0447\u0438\u0441\u043b\u043e \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 <code>x<sub>0<\/sub><\/code>, \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u0435\u0433\u043e \u0432 \u0441\u043a\u043e\u0431\u043a\u0430\u0445. \u041d\u043e \u0432 \u0434\u0430\u043d\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435, \u043a\u0430\u043a \u043c\u043e\u0436\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u0441\u043a\u043e\u0440\u043e \u0443\u0431\u0435\u0434\u0438\u0442\u044c\u0441\u044f, \u0437\u0434\u0440\u0430\u0432\u044b\u0439 \u0441\u043c\u044b\u0441\u043b \u0431\u0443\u0434\u0435\u0442 \u043d\u0435 \u0441\u0430\u043c\u044b\u043c \u043b\u0443\u0447\u0448\u0438\u043c \u043f\u043e\u043c\u043e\u0449\u043d\u0438\u043a\u043e\u043c. <\/p>\n<p>\u041f\u043e\u043f\u0440\u043e\u0431\u0443\u0435\u043c \u0432\u0432\u0435\u0441\u0442\u0438 \u043b\u044e\u0431\u043e\u0435 \u043f\u043e\u043b\u043e\u0436\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0435 \u0447\u0438\u0441\u043b\u043e \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u0438. \u0417\u0430\u043f\u0443\u0441\u0442\u0438\u043c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u043a\u043e\u0434: <\/p>\n<pre><code class=\"vbscript\">Dim i As Integer  For i = 1 To 3         Debug.Print Rnd(333)  Next \u2018\u041b\u0438\u0441\u0442\u0438\u043d\u0433 2<\/code><\/pre>\n<p>\u041f\u043e\u043b\u0443\u0447\u0438\u043c \u0432 \u0438\u0442\u043e\u0433\u0435 \u0432\u0441\u044e \u0442\u0443 \u0436\u0435 \u0441\u0430\u043c\u0443\u044e \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c: <\/p>\n<figure class=\"\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/7c4\/4cf\/87e\/7c44cf87e10eb820c6a38d2917da855b.png\" width=\"79\" height=\"51\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/7c4\/4cf\/87e\/7c44cf87e10eb820c6a38d2917da855b.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/7c4\/4cf\/87e\/7c44cf87e10eb820c6a38d2917da855b.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/figure>\n<p>\u041a\u0430\u043a\u043e\u0439 \u0431\u044b \u043f\u043e\u043b\u043e\u0436\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442 \u043c\u044b \u043d\u0435 \u0432\u0432\u043e\u0434\u0438\u043b\u0438 \u2013 \u0446\u0435\u043b\u044b\u0439 \u0438\u043b\u0438 \u0434\u0440\u043e\u0431\u043d\u044b\u0439 \u2013 \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0432\u0438\u0434\u0435\u0442\u044c \u0432\u0441\u044e \u0442\u0443 \u0436\u0435 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c. \u0415\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u043c\u043e\u043c\u0435\u043d\u0442: \u0435\u0441\u043b\u0438 \u043c\u044b \u0432\u0432\u0435\u0434\u0435\u043c \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u0431\u043e\u043b\u044c\u0448\u043e\u0435 \u0447\u0438\u0441\u043b\u043e, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043d\u0435 \u0431\u0443\u0434\u0435\u0442 \u0432\u043c\u0435\u0449\u0430\u0442\u044c\u0441\u044f \u0432 \u043e\u0442\u0432\u0435\u0434\u0435\u043d\u043d\u044b\u0435 \u0434\u043b\u044f \u0435\u0433\u043e \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0431\u0438\u0442\u044b, \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043c \u043e\u0448\u0438\u0431\u043a\u0443 \u043f\u0435\u0440\u0435\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f. <\/p>\n<figure class=\"\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/12c\/e92\/b65\/12ce92b657a0c78b8364f795368370b1.png\" alt=\"\u0423\u043f\u0441! \u0411\u0443\u0444\u0435\u0440 \u043f\u0435\u0440\u0435\u043f\u043e\u043b\u043d\u0435\u043d...\" title=\"\u0423\u043f\u0441! \u0411\u0443\u0444\u0435\u0440 \u043f\u0435\u0440\u0435\u043f\u043e\u043b\u043d\u0435\u043d...\" width=\"389\" height=\"221\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/12c\/e92\/b65\/12ce92b657a0c78b8364f795368370b1.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/12c\/e92\/b65\/12ce92b657a0c78b8364f795368370b1.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<div><figcaption>\u0423\u043f\u0441! \u0411\u0443\u0444\u0435\u0440 \u043f\u0435\u0440\u0435\u043f\u043e\u043b\u043d\u0435\u043d&#8230;<\/figcaption><\/div>\n<\/figure>\n<h3>\u042d\u0445\u043e \u043d\u0430\u0434\u043c\u043e\u0437\u0433\u0430<\/h3>\n<p>\u0421\u043a\u043e\u043b\u044c\u043a\u043e \u0431\u0438\u0442 \u043c\u043e\u0436\u0435\u0442 \u0437\u0430\u043d\u0438\u043c\u0430\u0442\u044c \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442 \u0444\u0443\u043d\u043a\u0446\u0438\u0438? \u0420\u0443\u0441\u0441\u043a\u043e\u044f\u0437\u044b\u0447\u043d\u0430\u044f <a href=\"https:\/\/learn.microsoft.com\/ru-ru\/office\/vba\/language\/reference\/user-interface-help\/rnd-function\" rel=\"noopener noreferrer nofollow\">\u0441\u043f\u0440\u0430\u0432\u043a\u0430 \u043e\u0442 Microsoft<\/a>, \u0441\u043a\u0430\u0436\u0435\u043c \u043f\u0440\u044f\u043c\u043e, \u043f\u0435\u0440\u0435\u0432\u0435\u0434\u0435\u043d\u0430 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043a\u0440\u0438\u0432\u043e. \u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u044d\u0442\u043e \u0434\u0435\u043b\u0430\u043b\u0438 \u043d\u0435\u043a\u0438\u0435 \u044d\u043d\u0442\u0443\u0437\u0438\u0430\u0441\u0442\u044b, \u043d\u043e \u044d\u0442\u043e, \u043a\u043e\u043d\u0435\u0447\u043d\u043e, \u0438\u0445 \u043d\u0435 \u0438\u0437\u0432\u0438\u043d\u044f\u0435\u0442, \u0438\u043c\u0445\u043e. \u0412\u0435\u0441\u044c\u043c\u0430 \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e \u0438 \u0442\u043e, \u0447\u0442\u043e \u0441\u043f\u0440\u0430\u0432\u043a\u0443 \u043f\u0435\u0440\u0435\u0432\u043e\u0434\u0438\u043b\u0438 \u043d\u0435\u043a\u0438\u0435 \u043f\u0435\u0440\u0435\u0432\u043e\u0434\u0447\u0438\u043a\u0438-\u043d\u0430\u0434\u043c\u043e\u0437\u0433\u0438 (\u0434\u043b\u044f \u0442\u0435\u0445, \u043a\u0442\u043e \u043d\u0435 \u0432 \u043a\u0443\u0440\u0441\u0435 \u0434\u0430\u043d\u043d\u043e\u0433\u043e \u0442\u0435\u0440\u043c\u0438\u043d\u0430 &#8212; \u043f\u0440\u0438\u0433\u043b\u0430\u0448\u0430\u044e \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u043c \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u0446\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u043c \u043f\u043e\u0438\u0441\u043a\u043e\u0432\u0438\u043a\u043e\u043c (\u044d\u0442\u043e \u0432\u0430\u0436\u043d\u043e!)), \u043d\u0435 \u0441\u043e\u0432\u0441\u0435\u043c \u0432\u043b\u0430\u0434\u0435\u044e\u0449\u0438\u0435 \u0442\u0435\u0440\u043c\u0438\u043d\u043e\u043b\u043e\u0433\u0438\u0435\u0439 \u0438 \u043d\u0435 \u0441\u043e\u0432\u0441\u0435\u043c \u0440\u0430\u0437\u0431\u0438\u0440\u0430\u044e\u0449\u0438\u0435\u0441\u044f \u0432 \u0442\u0435\u043c\u0435. \u041f\u0440\u044f\u043c\u0430\u044f \u0446\u0438\u0442\u0430\u0442\u0430 \u0433\u043b\u0430\u0441\u0438\u0442: <\/p>\n<blockquote>\n<p>\u041d\u0435\u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442Number \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043e\u0434\u043d\u0438\u043c \u0438\u043b\u0438 \u043b\u044e\u0431\u044b\u043c \u0434\u043e\u043f\u0443\u0441\u0442\u0438\u043c\u044b\u043c \u0447\u0438\u0441\u043b\u043e\u0432\u044b\u043c \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0435\u043c    <\/p>\n<\/blockquote>\n<p>\u0421\u043e\u0433\u043b\u0430\u0441\u0438\u0442\u0435\u0441\u044c, \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u0441\u043b\u043e\u0436\u043d\u0430\u044f \u0434\u043b\u044f \u043f\u043e\u043d\u0438\u043c\u0430\u043d\u0438\u044f \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044f. \u0412 <a href=\"https:\/\/learn.microsoft.com\/en-us\/office\/vba\/language\/reference\/user-interface-help\/rnd-function\" rel=\"noopener noreferrer nofollow\">\u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b\u0435 <\/a>\u044d\u0442\u0430 \u0444\u0440\u0430\u0437\u0430 \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0442\u0430\u043a:<\/p>\n<blockquote>\n<p>The optional Number argument is a Single or any valid numeric expression.    <\/p>\n<\/blockquote>\n<p>\u042d\u0442\u043e \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442, \u0447\u0442\u043e \u043d\u0435\u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442 Number \u043f\u0440\u0438\u043d\u0430\u0434\u043b\u0435\u0436\u0438\u0442 \u043a \u0442\u0438\u043f\u0443 Single, \u043b\u0438\u0431\u043e \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043b\u044e\u0431\u044b\u043c \u0434\u0440\u0443\u0433\u0438\u043c \u0434\u043e\u043f\u0443\u0441\u0442\u0438\u043c\u044b\u043c \u0447\u0438\u0441\u043b\u043e\u0432\u044b\u043c \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0435\u043c.<\/p>\n<h3>\u041f\u043e\u043f\u044b\u0442\u043a\u0438 \u043f\u043e\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u043d\u043e\u0432\u044b\u0435 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438<\/h3>\n<p>\u0422\u0438\u043f <code>Single <\/code>\u0432 VBA \u2013 \u044d\u0442\u043e \u0447\u0438\u0441\u043b\u043e \u0441 \u043f\u043b\u0430\u0432\u0430\u044e\u0449\u0435\u0439 \u0442\u043e\u0447\u043a\u043e\u0439 \u043e\u0434\u0438\u043d\u0430\u0440\u043d\u043e\u0439 \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u0438 \u0438 \u0434\u043b\u044f \u0435\u0433\u043e \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0432 \u043f\u0430\u043c\u044f\u0442\u0438 \u0432\u044b\u0434\u0435\u043b\u044f\u0435\u0442\u0441\u044f 32 \u0431\u0438\u0442\u0430 (4 \u0431\u0430\u0439\u0442\u0430). \u0414\u043e\u043f\u0443\u0441\u0442\u0438\u043c\u043e\u0435 \u0447\u0438\u0441\u043b\u043e\u0432\u043e\u0435 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u2013 \u044d\u0442\u043e \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u0430 \u0438\u043b\u0438 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f (\u043d\u0435\u043a\u043e\u0435 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0435, \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0435\u0435 \u0432 \u0441\u0435\u0431\u0435 \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u044b \u0438\/\u0438\u043b\u0438 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435). \u041d\u043e \u0438\u0442\u043e\u0433\u043e\u0432\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u044d\u0442\u043e\u0433\u043e \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u044f, \u0442\u0430\u043a \u0438\u043b\u0438 \u0438\u043d\u0430\u0447\u0435, \u0434\u043e\u043b\u0436\u043d\u043e \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u0442\u0438\u043f\u0443 <code>Single<\/code>. <\/p>\n<p>\u0418\u0442\u0430\u043a, \u0441 \u043f\u043e\u043b\u043e\u0436\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u043c\u0438 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u0430\u043c\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 <code>Rnd <\/code>\u043c\u044b \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u043b\u0438\u0441\u044c. \u0421\u0438\u0442\u0443\u0430\u0446\u0438\u044f \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u0441\u044f, \u0435\u0441\u043b\u0438 \u043c\u044b \u0432\u0432\u0435\u0434\u0435\u043c \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u0430 \u0447\u0438\u0441\u043b\u043e <code>0<\/code>. <\/p>\n<pre><code class=\"vbscript\">Dim i As Integer  For i = 1 To 3         Debug.Print Rnd(0)  Next \u2018\u041b\u0438\u0441\u0442\u0438\u043d\u0433 3<\/code><\/pre>\n<p>\u0412\u044b\u043f\u043e\u043b\u043d\u0438\u043c \u043a\u043e\u0434 \u041b\u0438\u0441\u0442\u0438\u043d\u0433\u0430 3 \u0438 \u043f\u043e\u043b\u0443\u0447\u0438\u043c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 (\u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u043d\u0435 \u0437\u0430\u0431\u0443\u0434\u0435\u043c \u043f\u0440\u0435\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043d\u0430\u0436\u0430\u0442\u044c \u043d\u0430 <em>Reset<\/em>):<\/p>\n<figure class=\"\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/c3e\/7c4\/55f\/c3e7c455f1a74f4acbc9a65b740290df.png\" width=\"110\" height=\"54\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/c3e\/7c4\/55f\/c3e7c455f1a74f4acbc9a65b740290df.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/c3e\/7c4\/55f\/c3e7c455f1a74f4acbc9a65b740290df.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/figure>\n<p>\u041a\u0430\u043a \u0432\u0438\u0434\u0438\u043c, \u0447\u0438\u0441\u043b\u043e 0 \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u0430 \u0432\u0441\u0435\u0433\u0434\u0430 \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0434\u0430\u0432\u0430\u0442\u044c \u043e\u0434\u043d\u043e \u0438 \u0442\u043e \u0436\u0435 \u0447\u0438\u0441\u043b\u043e \u0432 \u043b\u044e\u0431\u043e\u0439 \u0438\u0442\u0435\u0440\u0430\u0446\u0438\u0438 \u0440\u0430\u0431\u043e\u0442\u044b \u0444\u0443\u043d\u043a\u0446\u0438\u0438. \u0414\u043b\u044f \u043f\u043e\u043b\u043d\u043e\u0442\u044b \u043a\u0430\u0440\u0442\u0438\u043d\u044b \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u0441\u043a\u0430\u0437\u0430\u0442\u044c, \u0447\u0442\u043e \u043b\u044e\u0431\u043e\u0435 \u043e\u0442\u0440\u0438\u0446\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0435 \u0447\u0438\u0441\u043b\u043e \u0431\u0443\u0434\u0435\u0442 \u0432\u0435\u0441\u0442\u0438 \u0441\u0435\u0431\u044f \u0442\u0430\u043a \u0436\u0435. \u0412\u0432\u0435\u0434\u0435\u043c \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u0430 -1 \u0438 \u043f\u043e\u043b\u0443\u0447\u0438\u043c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435: <\/p>\n<figure class=\"\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/781\/7d3\/2d9\/7817d32d932111a2a32f33705e363019.png\" width=\"71\" height=\"49\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/781\/7d3\/2d9\/7817d32d932111a2a32f33705e363019.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/781\/7d3\/2d9\/7817d32d932111a2a32f33705e363019.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/figure>\n<p>\u0418\u0442\u0430\u043a, \u043a\u0430\u0437\u0430\u043b\u043e\u0441\u044c \u0431\u044b, \u0435\u0441\u043b\u0438 \u043d\u0435 \u043f\u043e\u043b\u043e\u0436\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0435, \u0442\u043e \u0445\u043e\u0442\u044f \u0431\u044b \u0447\u0438\u0441\u043b\u043e n \u2264 0 \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 <code>x<sub>0<\/sub><\/code>, \u043e\u0442\u043b\u0438\u0447\u043d\u043e\u0433\u043e \u043e\u0442 \u0437\u0430\u0434\u0430\u043d\u043d\u043e\u0433\u043e \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e. \u041d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435, \u044d\u0442\u043e \u0443\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043d\u0438\u0435, \u0435\u0441\u043b\u0438 \u0438 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u0438\u0441\u0442\u0438\u043d\u0435, \u0442\u043e \u043d\u0435 \u0431\u043e\u043b\u0435\u0435, \u0447\u0435\u043c \u043d\u0430 \u043f\u043e\u043b\u043e\u0432\u0438\u043d\u0443. <\/p>\n<p>\u0414\u043b\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u0434\u0430\u043d\u043d\u043e\u0439 \u0433\u0438\u043f\u043e\u0442\u0435\u0437\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u044d\u043c\u0443\u043b\u044f\u0442\u043e\u0440 \u0440\u0430\u0431\u043e\u0442\u044b \u0444\u0443\u043d\u043a\u0446\u0438\u0438 <code>Rnd<\/code>. \u0412\u0432\u0435\u0434\u0435\u043c \u0442\u0443\u0434\u0430 0 \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 <code>x<sub>0<\/sub><\/code><sub> <\/sub>\u0438 \u043f\u043e\u043b\u0443\u0447\u0438\u043c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435:\u00a0 <\/p>\n<figure class=\"\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/40b\/e52\/a23\/40be52a239c4178bc894489783a70e1b.png\" alt=\"\u041f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c, \u0437\u0430\u0434\u0430\u0432\u0430\u0435\u043c\u0430\u044f x0, \u0440\u0430\u0432\u043d\u044b\u043c 0.\" title=\"\u041f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c, \u0437\u0430\u0434\u0430\u0432\u0430\u0435\u043c\u0430\u044f x0, \u0440\u0430\u0432\u043d\u044b\u043c 0.\" width=\"204\" height=\"122\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/40b\/e52\/a23\/40be52a239c4178bc894489783a70e1b.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/40b\/e52\/a23\/40be52a239c4178bc894489783a70e1b.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<div><figcaption>\u041f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c, \u0437\u0430\u0434\u0430\u0432\u0430\u0435\u043c\u0430\u044f x<sub>0<\/sub>, \u0440\u0430\u0432\u043d\u044b\u043c 0.<\/figcaption><\/div>\n<\/figure>\n<p>\u041a\u0430\u043a \u0432\u0438\u0434\u043d\u043e, \u0435\u0441\u043b\u0438 \u0432 \u044d\u043c\u0443\u043b\u044f\u0442\u043e\u0440\u0435 \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 x<sub>0<\/sub> \u0432\u0437\u044f\u0442\u044c 0 \u0432 \u043f\u0435\u0440\u0432\u043e\u0439 (\u0438\u043b\u0438 \u043d\u0443\u043b\u0435\u0432\u043e\u0439 \u2013 \u043a\u043e\u043c\u0443 \u043a\u0430\u043a \u0431\u043e\u043b\u044c\u0448\u0435 \u043d\u0440\u0430\u0432\u0438\u0442\u0441\u044f) \u0438\u0442\u0435\u0440\u0430\u0446\u0438\u0438, \u0442\u043e \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 <code>rnd <\/code>\u0431\u0443\u0434\u0435\u0442 \u043e\u0442\u043b\u0438\u0447\u0430\u0442\u044c\u0441\u044f \u043e\u0442 \u0442\u043e\u0433\u043e, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u043d\u0430\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u044f (\u0430 \u0438\u043c\u0435\u043d\u043d\u043e: 1,953125*10<sup>-2<\/sup>). \u00a0<\/p>\n<p>\u0410\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u0443\u044e \u043a\u0430\u0440\u0442\u0438\u043d\u0443 \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043c \u0438 \u0434\u043b\u044f \u0447\u0438\u0441\u043b\u0430 -1:<\/p>\n<figure class=\"\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/119\/39e\/ed7\/11939eed73c5c64b352db8bab933ce0c.png\" alt=\"\u041f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c, \u0437\u0430\u0434\u0430\u0432\u0430\u0435\u043c\u0430\u044f x0, \u0440\u0430\u0432\u043d\u044b\u043c -1.\" title=\"\u041f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c, \u0437\u0430\u0434\u0430\u0432\u0430\u0435\u043c\u0430\u044f x0, \u0440\u0430\u0432\u043d\u044b\u043c -1.\" width=\"203\" height=\"122\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/119\/39e\/ed7\/11939eed73c5c64b352db8bab933ce0c.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/119\/39e\/ed7\/11939eed73c5c64b352db8bab933ce0c.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<div><figcaption>\u041f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c, \u0437\u0430\u0434\u0430\u0432\u0430\u0435\u043c\u0430\u044f x<sub>0<\/sub>, \u0440\u0430\u0432\u043d\u044b\u043c -1.<\/figcaption><\/div>\n<\/figure>\n<p>\u0414\u043b\u044f \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u0432\u0441\u044f\u043a\u043e\u0439 \u043d\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u0441\u0442\u0438, \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u044e\u0449\u0438\u0445 \u0438\u0437-\u0437\u0430 \u043d\u044e\u0430\u043d\u0441\u043e\u0432 \u043c\u043e\u0434\u0443\u043b\u044c\u043d\u043e\u0439 \u0430\u0440\u0438\u0444\u043c\u0435\u0442\u0438\u043a\u0438 \u043f\u0440\u0438 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f\u0445 \u0441 \u043e\u0442\u0440\u0438\u0446\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u043c\u0438 \u0447\u0438\u0441\u043b\u0430\u043c\u0438, \u044f \u043f\u043e\u043f\u0440\u043e\u0431\u043e\u0432\u0430\u043b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0447\u0438\u0441\u043b\u043e 1, \u0447\u0442\u043e\u0431\u044b \u0438\u0441\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0442\u0430\u043a\u0443\u044e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c. \u041d\u043e, \u043a\u0430\u043a \u0432\u0438\u0434\u043d\u043e, \u0435\u0434\u0438\u043d\u0438\u0446\u0430 \u0442\u0430\u043a\u0436\u0435 \u043d\u0435 \u0434\u0430\u043b\u0430 \u0442\u0440\u0435\u0431\u0443\u0435\u043c\u043e\u0433\u043e \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430: <\/p>\n<figure class=\"\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/4ef\/7b5\/0e1\/4ef7b50e1fa527fca068411f1ba45026.png\" alt=\"\u041f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c, \u0437\u0430\u0434\u0430\u0432\u0430\u0435\u043c\u0430\u044f x0, \u0440\u0430\u0432\u043d\u044b\u043c 1.\" title=\"\u041f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c, \u0437\u0430\u0434\u0430\u0432\u0430\u0435\u043c\u0430\u044f x0, \u0440\u0430\u0432\u043d\u044b\u043c 1.\" width=\"204\" height=\"121\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/4ef\/7b5\/0e1\/4ef7b50e1fa527fca068411f1ba45026.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/4ef\/7b5\/0e1\/4ef7b50e1fa527fca068411f1ba45026.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<div><figcaption>\u041f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c, \u0437\u0430\u0434\u0430\u0432\u0430\u0435\u043c\u0430\u044f x<sub>0<\/sub>, \u0440\u0430\u0432\u043d\u044b\u043c 1.<\/figcaption><\/div>\n<\/figure>\n<p>\u041b\u043e\u0433\u0438\u043a\u0430 \u0431\u044b\u043b\u0430 \u0442\u0430\u043a\u0430\u044f: \u0434\u043b\u044f \u043e\u0442\u0440\u0438\u0446\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u0447\u0438\u0441\u0435\u043b \u043f\u0440\u0430\u0432\u0438\u043b\u0430 \u043c\u043e\u0434\u0443\u043b\u044c\u043d\u043e\u0439 \u0430\u0440\u0438\u0444\u043c\u0435\u0442\u0438\u043a\u0438 \u043d\u0435 \u0442\u0430\u043a\u0438\u0435 \u043e\u0447\u0435\u0432\u0438\u0434\u043d\u044b\u0435, \u043a\u0430\u043a \u044d\u0442\u043e \u043c\u043e\u0436\u0435\u0442 \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u044c\u0441\u044f. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043f\u043e \u044d\u0442\u0438\u043c \u043f\u0440\u0430\u0432\u0438\u043b\u0430\u043c:<br \/> -1 \u2261 \u00a09 (mod 10). <\/p>\n<p>\u042d\u0442\u043e \u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0441\u044f \u043f\u043e\u043d\u044f\u0442\u043d\u043e, \u0435\u0441\u043b\u0438 \u043c\u044b \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u0438\u043c \u043b\u044e\u0431\u043e\u0435 \u0447\u0438\u0441\u043b\u043e <em>q<\/em>, \u0434\u0430\u044e\u0449\u0435\u0435 \u043f\u0440\u0438 \u0434\u0435\u043b\u0435\u043d\u0438\u0438 \u043d\u0430 <em>m<\/em> \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043e\u0441\u0442\u0430\u0442\u043e\u043a <em>r<\/em> \u043a\u0430\u043a:<\/p>\n<p><code>q = m\u2219t + r.<\/code> <\/p>\n<p>\u0422\u043e \u0435\u0441\u0442\u044c, 9 \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u043a\u0430\u043a 10\u22190 + 9, 19 \u2013 \u043a\u0430\u043a 10\u22191 + 9. \u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c -1 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043a\u0430\u043a: 10\u2219(-1) + 9.<\/p>\n<p>\u041d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u044f\u0437\u044b\u043a\u0438, \u043d\u0430\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u044f \u0437\u043d\u0430\u044e, \u043c\u043e\u0433\u0443\u0442 \u0438\u0433\u043d\u043e\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u044d\u0442\u0438 \u043f\u0440\u0430\u0432\u0438\u043b\u0430. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, C++ \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u043e\u0441\u0442\u0430\u0442\u043a\u0430 \u043e\u0442 \u0434\u0435\u043b\u0435\u043d\u0438\u044f -1 \u043d\u0430 10 <code>(-1 % 10<\/code> \u0432 \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441\u0435 C++), \u0432\u043e\u043e\u0431\u0449\u0435, \u0432\u044b\u0434\u0430\u0441\u0442 -1, \u0430 \u043d\u0435 9. <\/p>\n<p>\u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0434\u043b\u044f \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u0432\u0441\u0435\u0445 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0445 \u043d\u0435\u043e\u0436\u0438\u0434\u0430\u043d\u043d\u043e\u0441\u0442\u0435\u0439 \u044f \u0440\u0435\u0448\u0438\u043b \u043f\u043e\u043f\u0440\u043e\u0431\u043e\u0432\u0430\u0442\u044c \u0432\u0437\u044f\u0442\u044c \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 x<sub>0<\/sub> \u0438 -1, \u0438 1. \u0412\u0434\u0440\u0443\u0433, VBA \u0432\u044b\u0441\u0447\u0438\u0442\u044b\u0432\u0430\u0435\u0442 \u043e\u0441\u0442\u0430\u0442\u043e\u043a \u043d\u0430\u043f\u043e\u0434\u043e\u0431\u0438\u0435 C++, \u0430 \u043f\u043e\u0442\u043e\u043c, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0431\u0435\u0440\u0435\u0442 \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 x<sub>0<\/sub> \u0435\u0433\u043e \u0430\u0431\u0441\u043e\u043b\u044e\u0442\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435.\u00a0 <\/p>\n<p>\u041e\u043f\u0435\u0440\u0435\u0436\u0430\u044f \u0441\u043e\u0431\u044b\u0442\u0438\u044f, \u0441\u043a\u0430\u0436\u0443, \u0447\u0442\u043e \u0437\u0430\u0434\u0430\u0432 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442 n \u2264 0 \u0434\u043b\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u0438 Rnd(), VBA \u0431\u0443\u0434\u0435\u0442 \u043e\u043f\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0434\u0432\u0443\u043c\u044f \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f\u043c\u0438 x<sub>0<\/sub>. \u041f\u0435\u0440\u0432\u043e\u0435 \u0438\u0437 \u044d\u0442\u0438\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u2013 <strong><em>\u043c\u043d\u0438\u043c\u043e\u0435<\/em><\/strong>, \u0442\u043e\u0442 \u0441\u0430\u043c\u044b\u0439 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u044b \u0432\u0432\u0435\u043b\u0438 \u0432 \u0441\u043a\u043e\u0431\u043a\u0430\u0445. \u0412\u0442\u043e\u0440\u043e\u0435 \u2013 <strong><em>\u0440\u0435\u0430\u043b\u044c\u043d\u043e\u0435<\/em><\/strong>, \u0442\u043e \u0435\u0441\u0442\u044c \u0442\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435, \u0441 \u043a\u043e\u0442\u043e\u0440\u044b\u043c \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0434\u043b\u044f \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u043c\u043e\u0433\u043e \u0435\u0439 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0438 \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0434\u043e \u043d\u0430\u0441\u0442\u043e\u044f\u0449\u0435\u0433\u043e \u043c\u043e\u043c\u0435\u043d\u0442\u0430 \u043f\u043e\u043a\u0430 \u0447\u0442\u043e \u0441\u043a\u0440\u044b\u0442\u043e \u043e\u0442 \u043d\u0430\u0441. <\/p>\n<p>\u041d\u043e \u0441 \u0447\u0438\u0441\u043b\u043e\u043c 0 \u0432\u0441\u0435 \u043e\u0431\u0441\u0442\u043e\u0438\u0442 \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u043f\u043e-\u0434\u0440\u0443\u0433\u043e\u043c\u0443. \u041c\u044b \u0443\u0436\u0435 \u0432\u0438\u0434\u0435\u043b\u0438, \u0447\u0442\u043e 0 \u043c\u043e\u0436\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043c\u043d\u0438\u043c\u043e\u0433\u043e x<sub>0<\/sub>. \u041d\u043e \u043f\u0440\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438 \u043d\u0443\u043b\u044f \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u0430 \u0434\u043b\u044f Rnd<code>(<\/code>) \u0435\u0441\u0442\u044c \u0435\u0449\u0435 \u043e\u0434\u0438\u043d \u043c\u043e\u043c\u0435\u043d\u0442. \u041f\u043e\u043f\u0440\u043e\u0431\u0443\u0435\u043c \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u043a\u043e\u0434: <\/p>\n<pre><code class=\"vbscript\">Dim i As Integer  For i = 1 To 3         Debug.Print Rnd()  Next  For i = 1 To 3         Debug.Print Rnd(0)  Next \u2018\u041b\u0438\u0441\u0442\u0438\u043d\u0433 4<\/code><\/pre>\n<p>\u041f\u043e\u043b\u0443\u0447\u0438\u043c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442:<\/p>\n<figure class=\"\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/cda\/238\/6f3\/cda2386f3b1ad7886f5c231d38f53fe8.png\" width=\"84\" height=\"101\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/cda\/238\/6f3\/cda2386f3b1ad7886f5c231d38f53fe8.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/cda\/238\/6f3\/cda2386f3b1ad7886f5c231d38f53fe8.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/figure>\n<p>\u041c\u044b \u0432\u0438\u0434\u0438\u043c, \u0447\u0442\u043e \u043f\u0435\u0440\u0432\u044b\u0435 \u0442\u0440\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u043e\u0439 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0442 \u00ab\u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u043e\u043c\u0443\u00bb \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0443, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c x<sub>0<\/sub> \u0440\u0430\u0432\u0435\u043d 327680. \u0414\u0430\u043b\u0435\u0435 \u043c\u044b \u0432\u0438\u0434\u0438\u043c, \u0447\u0442\u043e \u0440\u0430\u0441\u0447\u0435\u0442 \u043e\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u043d\u0430 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u043c \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u043e\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0438 (x<sub>2<\/sub>) \u0438 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u043c\u043e\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0435\u0439 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u0438\u043c\u0435\u043d\u043d\u043e \u044d\u0442\u043e\u043c\u0443 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044e (\u0432 \u0434\u0430\u043d\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 &#8212; \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u043c\u0443 \u0447\u0438\u0441\u043b\u0443 8949370, \u0442. \u0435. \u043e\u0441\u0442\u0430\u0442\u043a\u0443, \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u043d\u043e\u043c\u0443 \u043d\u0430 \u043f\u0435\u0440\u0432\u043e\u0439 \u0438\u0442\u0435\u0440\u0430\u0446\u0438\u0438, \u0441\u0447\u0438\u0442\u0430\u044f, \u0447\u0442\u043e \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0443 \u043d\u0430 \u043d\u0443\u043b\u0435\u0432\u043e\u0439 \u0438\u0442\u0435\u0440\u0430\u0446\u0438\u0438).\u00a0 <\/p>\n<p>\u0415\u0441\u043b\u0438 \u043c\u044b \u0437\u0430\u0445\u043e\u0442\u0438\u043c \u0432\u043d\u043e\u0432\u044c \u00ab\u0441\u0442\u0440\u043e\u043d\u0443\u0442\u044c \u0441 \u043c\u0435\u0441\u0442\u0430\u00bb \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f, \u0442\u043e \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u0441\u043d\u043e\u0432\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u044e Rnd() \u0431\u0435\u0437 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u0430 (\u043b\u0438\u0431\u043e \u0441 \u043f\u043e\u043b\u043e\u0436\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u043c \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u043e\u043c). \u0412 \u0434\u0430\u043d\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u043d\u0430\u0447\u043d\u0443\u0442\u0441\u044f \u0441 x<sub>2(0)<\/sub> = 8949370. \u00a0<\/p>\n<h2>\u041b\u0435\u0433\u043a\u0438\u043c \u0434\u0432\u0438\u0436\u0435\u043d\u0438\u0435\u043c \u0440\u0443\u043a\u0438\u2026<\/h2>\n<p>\u041a\u0430\u043a \u0443\u0436\u0435 \u0431\u044b\u043b\u043e \u0441\u043a\u0430\u0437\u0430\u043d\u043e, \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u043c \u0440\u0430\u0431\u043e\u0442\u044b \u0444\u0443\u043d\u043a\u0446\u0438\u0438 Rnd() \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043f\u0441\u0435\u0432\u0434\u043e\u0441\u043b\u0443\u0447\u0430\u0439\u043d\u043e\u0435 \u0447\u0438\u0441\u043b\u043e \u0442\u0438\u043f\u0430 <code>Single. <\/code>\u041d\u043e \u0432 VBA \u0435\u0441\u0442\u044c \u0438 \u0442\u0430\u043a\u043e\u0439 \u0442\u0438\u043f \u0447\u0438\u0441\u0435\u043b \u0441 \u043f\u043b\u0430\u0432\u0430\u044e\u0449\u0435\u0439 \u0442\u043e\u0447\u043a\u043e\u0439, \u043a\u0430\u043a <code>Double<\/code>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432\u044b\u0434\u0435\u043b\u044f\u0435\u0442 \u0434\u043b\u044f \u0447\u0438\u0441\u043b\u0430 64 \u0431\u0438\u0442\u0430. <\/p>\n<p>\u041a\u0430\u0437\u0430\u043b\u043e\u0441\u044c \u0431\u044b, \u0435\u0441\u043b\u0438 \u043c\u044b \u0437\u0430\u0445\u043e\u0442\u0438\u043c \u00ab\u043f\u0440\u0435\u0432\u0440\u0430\u0442\u0438\u0442\u044c\u00bb \u0447\u0438\u0441\u043b\u043e \u0442\u0438\u043f\u0430 <code>Single <\/code>\u0432 \u0447\u0438\u0441\u043b\u043e \u0442\u0438\u043f\u0430 <code>Double <\/code>\u2013 \u0442\u043e \u043c\u044b \u0432\u0440\u044f\u0434 \u043b\u0438 \u0441\u043c\u043e\u0436\u0435\u043c \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u043a\u0430\u043a\u0438\u0435-\u0442\u043e \u043d\u043e\u0432\u044b\u0435 \u0437\u043d\u0430\u0447\u0430\u0449\u0438\u0435 \u0431\u0438\u0442\u044b. \u041d\u0435 \u0431\u0443\u0434\u0435\u043c \u0432\u0434\u0430\u0432\u0430\u0442\u044c\u0441\u044f \u0432 \u0442\u043e\u043d\u043a\u043e\u0441\u0442\u0438 \u043c\u0430\u0448\u0438\u043d\u043d\u043e\u0433\u043e \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0447\u0438\u0441\u0435\u043b. \u0413\u043e\u0432\u043e\u0440\u044f \u043e\u0431\u0440\u0430\u0437\u043d\u043e, \u043f\u0440\u0438 \u0442\u0430\u043a\u043e\u043c \u043f\u0435\u0440\u0435\u0432\u043e\u0434\u0435 \u0447\u0438\u0441\u043b\u0430 \u0438\u0437 \u043e\u0434\u043d\u043e\u0433\u043e \u0442\u0438\u043f\u0430 \u0432 \u0434\u0440\u0443\u0433\u043e\u0439, \u043d\u0435 \u0441\u0442\u043e\u0438\u0442 \u043e\u0436\u0438\u0434\u0430\u0442\u044c \u0447\u0435\u0433\u043e-\u0442\u043e \u0438\u043d\u043e\u0433\u043e, \u043f\u043e\u043c\u0438\u043c\u043e \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043d\u0443\u043b\u0435\u0439 \u0432 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u043d\u044b\u0435 \u043c\u043b\u0430\u0434\u0448\u0438\u0435\/\u0441\u0442\u0430\u0440\u0448\u0438\u0435 32 \u0440\u0430\u0437\u0440\u044f\u0434\u0430. <\/p>\n<p>\u0422\u043e \u0435\u0441\u0442\u044c, \u0435\u0441\u043b\u0438 \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u043e\u0436\u0438\u0442\u044c, \u0447\u0442\u043e \u0443 \u043d\u0430\u0441 \u0435\u0441\u0442\u044c \u0447\u0438\u0441\u043b\u043e, \u043f\u043e\u0434 \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0432\u044b\u0434\u0435\u043b\u0435\u043d\u043e 2 \u0434\u0435\u0441\u044f\u0442\u0438\u0447\u043d\u044b\u0445 \u0440\u0430\u0437\u0440\u044f\u0434\u0430 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, 0.1), \u0442\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0432 \u0435\u0449\u0435 \u0434\u0432\u0430 \u0434\u0435\u0441\u044f\u0442\u0438\u0447\u043d\u044b\u0445 \u0440\u0430\u0437\u0440\u044f\u0434\u0430 \u0432 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0447\u0438\u0441\u043b\u0430, \u043c\u044b \u043d\u0435 \u043c\u043e\u0436\u0435\u043c \u0440\u0430\u0441\u0441\u0447\u0438\u0442\u044b\u0432\u0430\u0442\u044c \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0447\u0442\u043e-\u043b\u0438\u0431\u043e, \u043f\u043e\u043c\u0438\u043c\u043e 0.100, 000.1 \u0438\u043b\u0438 00.10. \u041d\u043e, \u043a\u0430\u043a \u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f, \u043f\u0440\u0438 \u0440\u0430\u0431\u043e\u0442\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 <code>Rnd <\/code>\u044d\u0442\u043e \u043f\u0440\u0430\u0432\u0438\u043b\u043e \u043d\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442. \u041f\u043e\u043f\u0440\u043e\u0431\u0443\u0435\u043c \u043e\u0431\u044a\u044f\u0432\u0438\u0442\u044c \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e \u0442\u0438\u043f\u0430 Double \u0438 \u0437\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0432 \u043d\u0435\u0435 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0440\u0430\u0431\u043e\u0442\u044b \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430.<\/p>\n<pre><code class=\"vbscript\">Dim a As Double  Dim i As Integer  For i = 1 To 3      a = Rnd          Debug.Print a  Next   \u2018\u041b\u0438\u0441\u0442\u0438\u043d\u0433 6<\/code><\/pre>\n<p>\u0418, \u043a\u0442\u043e \u0431\u044b \u043c\u043e\u0433 \u043f\u043e\u0434\u0443\u043c\u0430\u0442\u044c! \u041c\u044b \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0442\u0435 \u0441\u0430\u043c\u044b\u0435 \u0437\u043d\u0430\u0447\u0430\u0449\u0438\u0435 \u0431\u0438\u0442\u044b:<\/p>\n<figure class=\"\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/b38\/163\/0cd\/b381630cd105d9ed4bf602c3f6de29d1.png\" alt=\"\u0412\u043e\u0442 \u0442\u0430\u043a \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043f\u0440\u0435\u0432\u0440\u0430\u0449\u0435\u043d\u0438\u0435 32-\u0431\u0438\u0442\u043d\u043e\u0433\u043e \u0447\u0438\u0441\u043b\u0430 \u0432 64-\u0431\u0438\u0442\u043d\u043e\u0435.  \" title=\"\u0412\u043e\u0442 \u0442\u0430\u043a \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043f\u0440\u0435\u0432\u0440\u0430\u0449\u0435\u043d\u0438\u0435 32-\u0431\u0438\u0442\u043d\u043e\u0433\u043e \u0447\u0438\u0441\u043b\u0430 \u0432 64-\u0431\u0438\u0442\u043d\u043e\u0435.  \" width=\"143\" height=\"52\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/b38\/163\/0cd\/b381630cd105d9ed4bf602c3f6de29d1.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/b38\/163\/0cd\/b381630cd105d9ed4bf602c3f6de29d1.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<div><figcaption>\u0412\u043e\u0442 \u0442\u0430\u043a \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043f\u0440\u0435\u0432\u0440\u0430\u0449\u0435\u043d\u0438\u0435 32-\u0431\u0438\u0442\u043d\u043e\u0433\u043e \u0447\u0438\u0441\u043b\u0430 \u0432 64-\u0431\u0438\u0442\u043d\u043e\u0435.  <\/figcaption><\/div>\n<\/figure>\n<p>\u0414\u043b\u044f \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u0430 \u043f\u043e\u0433\u0440\u0435\u0448\u043d\u043e\u0441\u0442\u0435\u0439, \u0438\u0441\u043a\u0430\u0436\u0435\u043d\u0438\u0439 \u043f\u0440\u0438 \u043f\u0435\u0440\u0435\u0432\u043e\u0434\u0435 \u0438\u0437 \u043e\u0434\u043d\u043e\u0433\u043e \u0442\u0438\u043f\u0430 \u0447\u0438\u0441\u043b\u0430 \u0432 \u0434\u0440\u0443\u0433\u043e\u0439, \u043f\u043e\u0432\u0442\u043e\u0440\u0438\u043c \u044d\u0442\u0443 \u0436\u0435 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u044e \u0432 \u044d\u043c\u0443\u043b\u044f\u0442\u043e\u0440\u0435 (\u043f\u0440\u0435\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0432 \u0447\u0438\u0441\u043b\u043e\u0432\u043e\u0439 \u0444\u043e\u0440\u043c\u0430\u0442 \u0434\u0430\u043d\u043d\u044b\u0445 \u044f\u0447\u0435\u0439\u043a\u0438 \u0438 \u0447\u0438\u0441\u043b\u043e \u0437\u043d\u0430\u043a\u043e\u0432 \u043f\u043e\u0441\u043b\u0435 \u0437\u0430\u043f\u044f\u0442\u043e\u0439, \u0440\u0430\u0432\u043d\u043e\u0435 15). \u0412 \u0438\u0442\u043e\u0433\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u043c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u0441\u043e\u0432\u0435\u0440\u0448\u0435\u043d\u043d\u043e \u0438\u0434\u0435\u043d\u0442\u0438\u0447\u043d\u044b\u0435 \u0432\u044b\u0448\u0435\u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u043d\u044b\u043c:<\/p>\n<figure class=\"\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/7dd\/ce8\/bb5\/7ddce8bb5ff43778701e42c1839906d0.png\" width=\"271\" height=\"122\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/7dd\/ce8\/bb5\/7ddce8bb5ff43778701e42c1839906d0.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/7dd\/ce8\/bb5\/7ddce8bb5ff43778701e42c1839906d0.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/figure>\n<p>\u041a\u0430\u043a \u0442\u0430\u043a\u043e\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e? \u041c\u043e\u0435 \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0442\u0430\u043a\u043e\u0435: \u0438\u0437\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0432 \u0444\u043e\u0440\u043c\u0430\u0442\u0435 Double \u0438 \u0443\u0436\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u0441\u043b\u0435 \u044d\u0442\u043e\u0433\u043e \u043f\u0435\u0440\u0435\u0432\u043e\u0434\u0438\u0442 \u0435\u0433\u043e \u0432 Single. \u0421\u043a\u0430\u0437\u0430\u0442\u044c \u0447\u0442\u043e-\u0442\u043e \u0431\u043e\u043b\u0435\u0435 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u0435 \u043f\u043e \u044d\u0442\u043e\u043c\u0443 \u043f\u043e\u0432\u043e\u0434\u0443 \u044f \u043f\u043e\u043a\u0430 \u0447\u0442\u043e \u043d\u0435 \u043c\u043e\u0433\u0443. \u0412\u043f\u043e\u043b\u043d\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u0447\u0442\u043e \u043a\u0442\u043e-\u0442\u043e \u0438\u0437 \u0447\u0438\u0442\u0430\u0442\u0435\u043b\u0435\u0439 \u0437\u043d\u0430\u0435\u0442 \u043e\u0431 \u044d\u0442\u043e\u043c \u0431\u043e\u043b\u044c\u0448\u0435. \u0415\u0441\u043b\u0438 \u044d\u0442\u043e \u0442\u0430\u043a, \u0442\u043e \u043c\u043d\u0435 \u0432\u0435\u0441\u044c\u043c\u0430 \u0445\u043e\u0442\u0435\u043b\u043e\u0441\u044c \u0431\u044b, \u0447\u0442\u043e\u0431\u044b \u0437\u043d\u0430\u044e\u0449\u0438\u0439 \u0447\u0435\u043b\u043e\u0432\u0435\u043a \u043e\u0437\u0432\u0443\u0447\u0438\u043b \u044d\u0442\u0443 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u0432 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u044f\u0445.\u00a0 <\/p>\n<h2>\u041f\u043e\u0434\u0432\u043e\u0434\u044f \u0438\u0442\u043e\u0433\u0438<\/h2>\n<p>\u0418\u0442\u0430\u043a, \u043e\u0431\u0440\u0430\u0437\u043d\u043e \u0433\u043e\u0432\u043e\u0440\u044f, \u0434\u0430\u043d\u043d\u0443\u044e \u0441\u0442\u0430\u0442\u044c\u044e \u043c\u043e\u0436\u043d\u043e \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0442\u044c \u043a\u0430\u043a \u0441\u0432\u043e\u0435\u043e\u0431\u0440\u0430\u0437\u043d\u044b\u0439 \u041a\u041c\u0411 \u043f\u043e \u0442\u0435\u043c\u0435 \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u043f\u0441\u0435\u0432\u0434\u043e\u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u0445 \u0447\u0438\u0441\u0435\u043b \u043a\u0430\u043a \u0432 \u0447\u0430\u0441\u0442\u043d\u043e\u043c (VBA), \u0442\u0430\u043a \u0438 \u0432 \u043e\u0431\u0449\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435. \u041c\u044b \u043a\u0440\u0430\u0442\u043a\u043e \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u043b\u0438, \u0447\u0442\u043e \u0442\u0430\u043a\u043e\u0435 \u043b\u0438\u043d\u0435\u0439\u043d\u044b\u0439 \u043a\u043e\u043d\u0433\u0440\u0443\u044d\u043d\u0442\u043d\u044b\u0439 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c, \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u0437\u0430\u0442\u0440\u043e\u043d\u0443\u043b\u0438 \u0442\u0435\u0440\u043c\u0438\u043d\u043e\u043b\u043e\u0433\u0438\u044e, \u0430 \u0442\u0430\u043a\u0436\u0435 \u043f\u0440\u043e\u0448\u043b\u0438\u0441\u044c \u043f\u043e \u0430\u0437\u0430\u043c \u043c\u043e\u0434\u0443\u043b\u044c\u043d\u043e\u0439 \u0430\u0440\u0438\u0444\u043c\u0435\u0442\u0438\u043a\u0438. \u0413\u043e\u0432\u043e\u0440\u044f \u043d\u0435\u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u043e VBA, \u043c\u044b \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u043b\u0438 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u044e\u0430\u043d\u0441\u044b \u0440\u0430\u0431\u043e\u0442\u044b \u0444\u0443\u043d\u043a\u0446\u0438\u0438 <code>Rnd()<\/code>.\u00a0 <\/p>\n<p>\u0412 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0445 \u043c\u0430\u0442\u0435\u0440\u0438\u0430\u043b\u0430\u0445 (\u043d\u043e \u044d\u0442\u043e \u0431\u0443\u0434\u0435\u0442 \u043d\u0435 \u043e\u0447\u0435\u043d\u044c \u0441\u043a\u043e\u0440\u043e, \u043a\u0430\u043a \u043e\u043a\u0430\u0437\u0430\u043b\u043e\u0441\u044c \u0432 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u0440\u0430\u0431\u043e\u0442\u044b) \u044f \u043f\u043b\u0430\u043d\u0438\u0440\u0443\u044e \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u0430\u0442\u044c \u043e \u0440\u0430\u0431\u043e\u0442\u0435 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u0430 <code>Randomize<\/code>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439, \u043a\u0430\u043a \u0433\u043e\u0432\u043e\u0440\u0438\u0442\u0441\u044f, \u0432 \u043e<a href=\"https:\/\/learn.microsoft.com\/ru-ru\/office\/vba\/language\/reference\/user-interface-help\/randomize-statement\" rel=\"noopener noreferrer nofollow\">\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u0439 \u0441\u043f\u0440\u0430\u0432\u043a\u0435<\/a>, \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u0442 \u043d\u0430\u0441\u0442\u043e\u044f\u0449\u0438\u0439 \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440 \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u0445 \u0447\u0438\u0441\u0435\u043b! \u0425\u043e\u0442\u0435\u043b\u043e\u0441\u044c \u0431\u044b \u043e\u0442\u043c\u0435\u0442\u0438\u0442\u044c, \u0447\u0442\u043e <a href=\"https:\/\/learn.microsoft.com\/ru-ru\/office\/vba\/language\/reference\/user-interface-help\/rnd-function\" rel=\"noopener noreferrer nofollow\">\u0432 \u0441\u043f\u0440\u0430\u0432\u043a\u0435 \u043f\u043e \u0444\u0443\u043d\u043a\u0446\u0438\u0438 Rnd<\/a><code> <\/code>\u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043e, \u0447\u0442\u043e \u0434\u0430\u043d\u043d\u0430\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f\u00a0 \u0432\u043e \u0432\u0440\u0435\u043c\u044f \u0441\u0432\u043e\u0435\u0439 \u0440\u0430\u0431\u043e\u0442\u044b \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0438\u043c\u0435\u043d\u043d\u043e \u043f\u0441\u0435\u0432\u0434\u043e\u0441\u043b\u0443\u0447\u0430\u0439\u043d\u043e\u0435 \u0447\u0438\u0441\u043b\u043e.<\/p>\n<p>\u0422\u0430\u043a\u0436\u0435 \u044f \u043f\u043b\u0430\u043d\u0438\u0440\u0443\u044e \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u044b \u0440\u0430\u0431\u043e\u0442\u044b \u0442\u043e\u0433\u043e, \u0447\u0442\u043e \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0437\u0432\u0430\u0442\u044c \u0445\u0435\u0448-\u0444\u0443\u043d\u043a\u0446\u0438\u044f\u043c\u0438 (\u0441\u043a\u0430\u0436\u0443 \u0441\u0440\u0430\u0437\u0443 \u2013 \u0447\u0442\u043e \u044d\u0442\u0438 \u0445\u0435\u0448-\u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0432\u043f\u043e\u043b\u043d\u0435 \u0441\u043f\u0440\u0430\u0432\u0435\u0434\u043b\u0438\u0432\u043e \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0437\u0432\u0430\u0442\u044c \u043f\u0441\u0435\u0432\u0434\u043e\u0445\u0435\u0448-\u0444\u0443\u043d\u043a\u0446\u0438\u044f\u043c\u0438), \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u0435\u0440\u0435\u0432\u043e\u0434\u044f\u0442 \u043c\u043d\u0438\u043c\u043e\u0435 \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0432 \u0435\u0435 \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u0435 \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0432 VBA \u0434\u043b\u044f \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u043f\u0441\u0435\u0432\u0434\u043e\u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u0445 \u0447\u0438\u0441\u0435\u043b. \u0412\u0435\u0440\u043e\u044f\u0442\u043d\u0435\u0435 \u0432\u0441\u0435\u0433\u043e, \u044d\u0442\u043e \u0441\u043d\u043e\u0432\u0430 \u0431\u0443\u0434\u0435\u0442 \u0444\u043e\u0440\u043c\u0430\u0442 \u043b\u043e\u043d\u0433\u0440\u0438\u0434\u0430. \u041c\u0430\u0442\u0435\u0440\u0438\u0430\u043b\u0430 \u043d\u0430\u043a\u043e\u043f\u0438\u043b\u043e\u0441\u044c \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e. <\/p>\n<p>\u0412 \u0437\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u043d\u0430\u0434\u043e \u0441\u043a\u0430\u0437\u0430\u0442\u044c, \u0447\u0442\u043e, \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0437\u0430\u0442\u0440\u043e\u043d\u0443\u0442\u044b\u0435 \u0437\u0434\u0435\u0441\u044c \u043c\u043e\u043c\u0435\u043d\u0442\u044b \u0443\u0436\u0435 \u043e\u0441\u0432\u044f\u0449\u0430\u043b\u0438\u0441\u044c \u0440\u0430\u043d\u0435\u0435, \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u043a\u0442\u043e-\u0442\u043e \u043f\u043e\u0441\u0447\u0438\u0442\u0430\u0435\u0442 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u0443\u044e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u0438\u0437\u0431\u044b\u0442\u043e\u0447\u043d\u043e\u0439 \u0438 \u043e\u0431\u0449\u0435\u0438\u0437\u0432\u0435\u0441\u0442\u043d\u043e\u0439. \u0412 \u0441\u0432\u044f\u0437\u0438 \u0441 \u044d\u0442\u0438\u043c \u044f \u043d\u0435 \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u044e \u0441\u0447\u0438\u0442\u0430\u0442\u044c \u044d\u0442\u043e\u0442 \u043c\u0430\u0442\u0435\u0440\u0438\u0430\u043b \u043a\u0430\u043a\u0438\u043c-\u0442\u043e \u0441\u0430\u043c\u043e\u0441\u0442\u043e\u044f\u0442\u0435\u043b\u044c\u043d\u044b\u043c \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u0435\u043c. \u0411\u043e\u043b\u0435\u0435 \u043f\u043e\u0434\u0445\u043e\u0434\u044f\u0449\u0435\u0435 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u0434\u043b\u044f \u043d\u0435\u0433\u043e \u2013 \u0432\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u0432 \u0442\u0435\u043c\u0443, \u043f\u0440\u0435\u0434\u0432\u0430\u0440\u044f\u044e\u0449\u0435\u0435 \u0435\u0435 \u00ab\u0442\u0435\u043b\u043e\u00bb. <\/p>\n<p>\u041d\u0430 \u044d\u0442\u043e\u043c \u043f\u043e\u043a\u0430 \u0432\u0441\u0435. \u041d\u0430\u0434\u0435\u044e\u0441\u044c \u043d\u0430 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u0438\u0432\u043d\u044b\u0439 \u0444\u0438\u0434\u0431\u0435\u043a. \u0414\u043e \u043d\u043e\u0432\u044b\u0445 \u0432\u0441\u0442\u0440\u0435\u0447 \u043d\u0430 <strong>\u0425\u0430\u0431\u0440\u0435<\/strong>!<\/p>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/932850\/\"> https:\/\/habr.com\/ru\/articles\/932850\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u041d\u0435\u0434\u0430\u0432\u043d\u043e \u043c\u043d\u0435 \u043f\u0440\u0438\u0448\u043b\u0430 \u0432 \u0433\u043e\u043b\u043e\u0432\u0443 \u0438\u0434\u0435\u044f \u043f\u043e\u043a\u043e\u0432\u044b\u0440\u044f\u0442\u044c\u0441\u044f \u0432 \u043d\u0435\u0434\u0440\u0430\u0445 \u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440\u0430 \u0441\u043a\u0440\u0438\u043f\u0442\u043e\u0432\u043e\u0433\u043e \u044f\u0437\u044b\u043a\u0430 VBA, \u0432\u0448\u0438\u0442\u043e\u0433\u043e \u0432\u043d\u0443\u0442\u0440\u044c \u0441\u0442\u0430\u0440\u043e\u0439 \u0434\u043e\u0431\u0440\u043e\u0439 Excel. \u041a\u043e\u043d\u0435\u0447\u043d\u043e, \u043d\u0438 \u0434\u043b\u044f \u043a\u043e\u0433\u043e \u043d\u0435 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0441\u0435\u043a\u0440\u0435\u0442\u043e\u043c, \u0447\u0442\u043e \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u044b \u043a\u043e\u0440\u043f\u043e\u0440\u0430\u0446\u0438\u0438 Microsoft \u0442\u0430\u044f\u0442 \u0432 \u0441\u0435\u0431\u0435 \u043f\u043e\u0438\u0441\u0442\u0438\u043d\u0435 \u0431\u0435\u0437\u0434\u043e\u043d\u043d\u044b\u0435 \u0433\u043b\u0443\u0431\u0438\u043d\u044b, \u0438 \u044d\u0442\u0438 \u0433\u043b\u0443\u0431\u0438\u043d\u044b \u043c\u043e\u0433\u0443\u0442 \u0437\u0430\u0442\u044f\u043d\u0443\u0442\u044c \u0432 \u0441\u0435\u0431\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u043d\u0435\u043e\u0441\u0442\u043e\u0440\u043e\u0436\u043d\u043e\u0433\u043e \u0438\u0445 \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044f. \u041a\u0430\u0437\u0430\u043b\u043e\u0441\u044c \u0431\u044b \u2013 \u0432\u0441\u0435\u043c \u0434\u0430\u0432\u043d\u043e \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u044b\u0439 (\u0432 \u0443\u0437\u043a\u0438\u0445 \u043a\u0440\u0443\u0433\u0430\u0445, \u043a\u043e\u043d\u0435\u0447\u043d\u043e) VBA, \u0437\u0430\u0441\u0442\u044b\u0432\u0448\u0438\u0439 \u0432 \u0441\u0432\u043e\u0435\u043c \u0440\u0430\u0437\u0432\u0438\u0442\u0438\u0438 \u044f\u0437\u044b\u043a. \u0427\u0442\u043e \u0442\u0430\u043c \u0435\u0449\u0435 \u043c\u043e\u0436\u043d\u043e \u043e\u0442\u043a\u043e\u043f\u0430\u0442\u044c? \u0421\u043f\u043e\u0439\u043b\u0435\u0440: \u043e\u0442\u043a\u043e\u043f\u0430\u0442\u044c \u043d\u043e\u0432\u043e\u0433\u043e \u0442\u0430\u043c \u0432\u0440\u044f\u0434 \u043b\u0438 \u0447\u0442\u043e-\u0442\u043e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u043d\u043e \u0432\u043e\u0442 \u043a\u043e\u043f\u043d\u0443\u0442\u044c \u043f\u043e\u0433\u043b\u0443\u0431\u0436\u0435 &#8212; \u044d\u0442\u043e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e. <\/p>\n<p>\u041f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u0442\u0430\u043a \u0436\u0435 \u0440\u0430\u0441\u0441\u0443\u0436\u0434\u0430\u043b \u0438 \u044f, \u043a\u043e\u0433\u0434\u0430 \u043d\u0430\u0436\u0438\u043c\u0430\u043b \u0434\u0432\u0435 \u043a\u043b\u0430\u0432\u0438\u0448\u0438 <strong>Alt<\/strong>+<strong>F11<\/strong>, \u043f\u043e\u0441\u043b\u0435 \u0442\u043e\u0433\u043e \u043a\u0430\u043a \u043e\u0442\u043a\u0440\u044b\u043b \u043d\u043e\u0432\u0443\u044e \u043a\u043d\u0438\u0433\u0443 \u0434\u043e \u0431\u043e\u043b\u0438 \u0437\u043d\u0430\u043a\u043e\u043c\u043e\u0439 Excel\u2019\u043a\u0438. \u041c\u043e\u0435\u0439 \u0446\u0435\u043b\u044c\u044e \u0431\u044b\u043b\u043e \u0432\u0431\u0438\u0442\u044c \u043f\u0440\u043e\u0441\u0442\u0435\u043d\u044c\u043a\u0438\u0439 \u043a\u043e\u0434 \u0438\u0437 \u0441\u0430\u043c\u043e\u0443\u0447\u0438\u0442\u0435\u043b\u044f \u043f\u043e VBA \u0438 \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u043f\u043e\u0438\u0433\u0440\u0430\u0442\u044c\u0441\u044f \u0441 \u043d\u0438\u043c. \u041f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c, \u0447\u0442\u043e \u0432\u044b\u0434\u0430\u0441\u0442 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430 \u2013 \u0435\u0441\u043b\u0438 \u0432\u044b\u0440\u0430\u0436\u0430\u0442\u044c\u0441\u044f \u0441\u0442\u0443\u0434\u0435\u043d\u0447\u0435\u0441\u043a\u0438\u043c \u044f\u0437\u044b\u043a\u043e\u043c, \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043e\u0431\u044b\u0447\u043d\u0443\u044e \u043b\u0430\u0431\u043e\u0440\u0430\u0442\u043e\u0440\u043d\u0443\u044e \u0440\u0430\u0431\u043e\u0442\u0443. \u0418 \u0432 \u044d\u0442\u043e\u0442 \u043c\u043e\u043c\u0435\u043d\u0442 \u043c\u043d\u0435 \u043d\u0430 \u0433\u043b\u0430\u0437\u0430 \u043f\u043e\u043f\u0430\u043b\u0430\u0441\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u044f Rnd(), \u043a\u043e\u0442\u043e\u0440\u0430\u044f, \u043a\u0430\u043a \u0441\u043e\u043e\u0431\u0449\u0430\u0435\u0442 <a href=\"https:\/\/learn.microsoft.com\/ru-ru\/office\/vba\/language\/reference\/user-interface-help\/rnd-function\" rel=\"noopener noreferrer nofollow\">\u0441\u043f\u0440\u0430\u0432\u043a\u0430 Microsoft<\/a>, \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435, \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0435\u0435 \u043f\u0441\u0435\u0432\u0434\u043e\u0441\u043b\u0443\u0447\u0430\u0439\u043d\u043e\u0435 \u0447\u0438\u0441\u043b\u043e.\u00a0\u00a0<\/p>\n<p>\u041d\u0430 \u0442\u043e\u0442 \u043c\u043e\u043c\u0435\u043d\u0442 \u043d\u0438\u0447\u0442\u043e \u043d\u0435 \u043f\u0440\u0435\u0434\u0432\u0435\u0449\u0430\u043b\u043e \u043a\u0430\u043a\u043e\u0439-\u043b\u0438\u0431\u043e \u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438. \u0414\u0430, \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440 \u043f\u0441\u0435\u0432\u0434\u043e\u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u0445 \u0447\u0438\u0441\u0435\u043b, \u0432\u0448\u0438\u0442\u044b\u0439 \u0432 VBA \u2013 \u043f\u0440\u043e\u0441\u0442\u043e\u0439 <strong><em>\u043b\u0438\u043d\u0435\u0439\u043d\u044b\u0439 \u043a\u043e\u043d\u0433\u0440\u0443\u044d\u043d\u0442\u043d\u044b\u0439 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c<\/em><\/strong>. \u041d\u0438\u0447\u0435\u0433\u043e \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0433\u043e, \u043a\u0430\u0437\u0430\u043b\u043e\u0441\u044c \u0431\u044b. \u0418 \u0438\u043c\u0435\u043d\u043d\u043e \u0432 \u044d\u0442\u043e\u0442 \u043c\u043e\u043c\u0435\u043d\u0442 \u043c\u0435\u043d\u044f \u0443\u0433\u043e\u0440\u0430\u0437\u0434\u0438\u043b\u043e \u0437\u0430\u0433\u043b\u044f\u043d\u0443\u0442\u044c \u0432 \u043a\u0440\u043e\u043b\u0438\u0447\u044c\u044e \u043d\u043e\u0440\u0443, \u0433\u043b\u0443\u0431\u0438\u043d\u044b \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043e\u043a\u0430\u0437\u0430\u043b\u0438\u0441\u044c \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u0432\u043d\u0443\u0448\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u043c\u0438. <\/p>\n<p>\u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u0447\u0438\u0442\u0430\u0442\u0435\u043b\u044f \u0442\u0430\u043a\u0436\u0435 \u0437\u0430\u0438\u043d\u0442\u0435\u0440\u0435\u0441\u0443\u0435\u0442 \u0432\u043e\u043f\u0440\u043e\u0441 \u043e \u0442\u043e\u043c, \u043d\u0430\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0433\u043b\u0443\u0431\u043e\u043a\u0430 \u044d\u0442\u0430 \u043a\u0440\u043e\u043b\u0438\u0447\u044c\u044f \u043d\u043e\u0440\u0430. \u0415\u0441\u043b\u0438 \u044d\u0442\u043e \u0442\u0430\u043a, \u0442\u043e \u043f\u0440\u0438\u0433\u043b\u0430\u0448\u0430\u044e \u0437\u0430\u0433\u043b\u044f\u043d\u0443\u0442\u044c \u0442\u0443\u0434\u0430 \u0432\u043c\u0435\u0441\u0442\u0435 \u2013 \u043d\u0435 \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u043e, \u0447\u0442\u043e \u043d\u0430\u043c \u0432\u0441\u0435-\u0442\u0430\u043a\u0438 \u0443\u0434\u0430\u0441\u0442\u0441\u044f \u0434\u043e\u0431\u0440\u0430\u0442\u044c\u0441\u044f \u0434\u043e \u0435\u0435 \u0434\u043d\u0430. \u041f\u0440\u0438 \u044d\u0442\u043e\u043c \u043d\u0438\u043a\u0442\u043e \u043d\u0435 \u0433\u0430\u0440\u0430\u043d\u0442\u0438\u0440\u0443\u0435\u0442 (\u0434\u0430\u0436\u0435 \u0430\u0432\u0442\u043e\u0440), \u0447\u0442\u043e \u0432 \u044d\u0442\u043e\u0442 \u043c\u043e\u043c\u0435\u043d\u0442 \u0441\u043d\u0438\u0437\u0443 \u043d\u0435 \u043f\u043e\u0441\u0442\u0443\u0447\u0430\u0442&#8230; <\/p>\n<h3>\u041d\u0435\u043c\u043d\u043e\u0433\u043e \u0442\u0435\u043e\u0440\u0438\u0438<\/h3>\n<p>\u0415\u0441\u043b\u0438 \u0443 \u043d\u0430\u0441 \u0435\u0441\u0442\u044c \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u0445 \u0447\u0438\u0441\u0435\u043b, \u043c\u044b \u043d\u0438\u043a\u043e\u0433\u0434\u0430 \u0441 \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u044c\u044e \u043d\u0435 \u0441\u043c\u043e\u0436\u0435\u043c \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u0442\u044c, \u043a\u0430\u043a\u043e\u0435 \u0447\u0438\u0441\u043b\u043e \u0443 \u043d\u0430\u0441 \u00ab\u043f\u043e\u044f\u0432\u0438\u0442\u0441\u044f\u00bb \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c. \u041c\u0430\u043a\u0441\u0438\u043c\u0443\u043c, \u0447\u0442\u043e \u043c\u044b \u0441\u043c\u043e\u0436\u0435\u043c \u0434\u0435\u043b\u0430\u0442\u044c \u2013 \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0430\u043d\u0430\u043b\u0438\u0437\u0430 \u0441 \u0431\u043e\u043b\u044c\u0448\u0435\u0439 \u0438\u043b\u0438 \u043c\u0435\u043d\u044c\u0448\u0435\u0439 \u0441\u0442\u0435\u043f\u0435\u043d\u0438 \u0434\u043e\u0441\u0442\u043e\u0432\u0435\u0440\u043d\u043e\u0441\u0442\u0438 \u043f\u043e\u043f\u044b\u0442\u0430\u0442\u044c\u0441\u044f \u0435\u0433\u043e \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u0442\u044c.\u00a0 <\/p>\n<p>\u0415\u0441\u043b\u0438 \u043c\u044b \u0438\u043c\u0435\u0435\u043c \u0434\u0435\u043b\u043e \u0441 \u043f\u0441\u0435\u0432\u0434\u043e\u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u043c\u0438 \u0447\u0438\u0441\u043b\u0430\u043c\u0438, \u0442\u043e \u0437\u043d\u0430\u044f \u0437\u0430\u043a\u043e\u043d\u044b \u0438\u0445 \u043f\u043e\u044f\u0432\u043b\u0435\u043d\u0438\u044f, \u043c\u044b \u0441 \u043b\u0435\u0433\u043a\u043e\u0441\u0442\u044c\u044e (\u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0439) \u0441\u043c\u043e\u0436\u0435\u043c \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u044c \u043b\u044e\u0431\u043e\u0435 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435 \u0447\u0438\u0441\u043b\u043e \u0432 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438. \u041b\u0438\u043d\u0435\u0439\u043d\u044b\u0439 \u043a\u043e\u043d\u0433\u0440\u0443\u044d\u043d\u0442\u043d\u044b\u0439 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c (\u0438\u043b\u0438 \u043c\u0435\u0442\u043e\u0434) (\u0434\u0430\u043b\u0435\u0435, <strong><em>\u041b\u041a\u041c<\/em><\/strong>) \u2013 \u044d\u0442\u043e \u043e\u0434\u0438\u043d \u0438\u0437 \u0441\u043f\u043e\u0441\u043e\u0431\u043e\u0432 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u043f\u0441\u0435\u0432\u0434\u043e\u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u0445 \u0447\u0438\u0441\u0435\u043b. <\/p>\n<p>\u0421\u0430\u043c \u0441\u043f\u043e\u0441\u043e\u0431 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u043f\u0441\u0435\u0432\u0434\u043e\u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u0445 \u0447\u0438\u0441\u0435\u043b \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 \u041b\u041a\u041c \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u043f\u0440\u043e\u0441\u0442. \u0423 \u043d\u0430\u0441 \u0435\u0441\u0442\u044c \u0447\u0435\u0442\u044b\u0440\u0435 \u0446\u0435\u043b\u044b\u0445 \u0447\u0438\u0441\u043b\u0430:<\/p>\n<ul>\n<li>\n<p>m \u2013 <strong><em>\u043c\u043e\u0434\u0443\u043b\u044c<\/em><\/strong> \u0438\u043b\u0438 <strong><em>\u0434\u0435\u043b\u0438\u0442\u0435\u043b\u044c<\/em><\/strong> (modulus);<\/p>\n<\/li>\n<li>\n<p>a \u2013 <strong><em>\u043c\u043d\u043e\u0436\u0438\u0442\u0435\u043b\u044c<\/em><\/strong> (multiplier);<\/p>\n<\/li>\n<li>\n<p>\u0441 \u2013 <strong><em>\u043f\u0440\u0438\u0440\u0430\u0449\u0435\u043d\u0438\u0435<\/em><\/strong> (increment);<\/p>\n<\/li>\n<li>\n<p>x<sub>0<\/sub> \u2013 <strong><em>\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435<\/em><\/strong> (seed).<\/p>\n<\/li>\n<\/ul>\n<p>\u0421\u0430\u043c\u0430 \u0444\u043e\u0440\u043c\u0443\u043b\u0430, \u043f\u043e \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0432\u044b\u0447\u0438\u0441\u043b\u044f\u044e\u0442\u0441\u044f \u043f\u0441\u0435\u0432\u0434\u043e\u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u0435 \u0447\u0438\u0441\u043b\u0430, \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0442\u0430\u043a: <\/p>\n<p><code>x<sub>1<\/sub> = (x<sub>0<\/sub> * a + c ) MOD m.<\/code><\/p>\n<p>\u0422\u043e \u0435\u0441\u0442\u044c, \u043c\u044b \u043d\u0430\u0445\u043e\u0434\u0438\u043c \u043e\u0441\u0442\u0430\u0442\u043e\u043a \u043f\u0440\u0438 \u0446\u0435\u043b\u043e\u0447\u0438\u0441\u043b\u0435\u043d\u043d\u043e\u043c \u0434\u0435\u043b\u0435\u043d\u0438\u0438 \u0447\u0438\u0441\u043b\u0430 (x<sub>0<\/sub> * a + c) \u043d\u0430 m . \u042d\u0442\u043e\u0442 \u043e\u0441\u0442\u0430\u0442\u043e\u043a \u0438 \u0435\u0441\u0442\u044c \u043d\u0430\u0448\u0435 \u043f\u0441\u0435\u0432\u0434\u043e\u0441\u043b\u0443\u0447\u0430\u0439\u043d\u043e\u0435 \u0447\u0438\u0441\u043b\u043e. \u0414\u0430\u043b\u0435\u0435 \u043c\u044b \u0441\u0442\u0430\u0432\u0438\u043c \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u043d\u044b\u0439 x<sub>1 <\/sub>\u043d\u0430 \u043c\u0435\u0441\u0442\u043e x<sub>0 <\/sub>\u0438 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0432\u0442\u043e\u0440\u043e\u0435 \u0447\u0438\u0441\u043b\u043e \u0432 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438. \u0422\u0435\u043e\u0440\u0435\u0442\u0438\u0447\u0435\u0441\u043a\u0438, \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u043f\u043e\u0432\u0442\u043e\u0440\u044f\u0442\u044c \u043f\u043e\u0434\u043e\u0431\u043d\u0443\u044e \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u044e \u0432\u043f\u043b\u043e\u0442\u044c \u0434\u043e \u0431\u0435\u0441\u043a\u043e\u043d\u0435\u0447\u043d\u043e\u0441\u0442\u0438, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u0430\u044f \u0434\u043b\u0438\u043d\u0430 \u0442\u0430\u043a\u043e\u0439 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u0440\u0430\u0432\u043d\u044f\u0435\u0442\u0441\u044f \u0434\u0435\u043b\u0438\u0442\u0435\u043b\u044e. <\/p>\n<p>\u042d\u0442\u043e \u0437\u043d\u0430\u0447\u0438\u0442, \u0447\u0442\u043e \u0435\u0441\u043b\u0438 \u043c\u044b \u0432\u043e\u0437\u044c\u043c\u0435\u043c \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e \u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u0434\u0435\u043b\u0438\u0442\u0435\u043b\u044c, \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e \u0431\u043e\u043b\u044c\u0448\u0443\u044e \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u0445 \u0447\u0438\u0441\u0435\u043b. \u042d\u0442\u043e \u043f\u043e\u043d\u044f\u0442\u043d\u043e, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u0435\u0441\u043b\u0438 \u0443 \u043d\u0430\u0441 \u0435\u0441\u0442\u044c \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0439 \u0446\u0435\u043b\u044b\u0439 \u0434\u0435\u043b\u0438\u0442\u0435\u043b\u044c, \u0442\u043e \u0442\u0435\u043e\u0440\u0435\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e\u043c \u043e\u0441\u0442\u0430\u0442\u043a\u043e\u0432, \u0440\u0430\u0432\u043d\u044b\u043c \u0441\u0430\u043c\u043e\u043c\u0443 \u043c\u043e\u0434\u0443\u043b\u044e. \u0410 \u0435\u0441\u043b\u0438 \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0441\u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0441\u0442\u0430\u0442\u043a\u043e\u0432, \u0442\u043e \u0432\u0441\u0435 \u043e\u043d\u0438 \u043c\u043e\u0433\u0443\u0442 \u0440\u0430\u043d\u043e \u0438\u043b\u0438 \u043f\u043e\u0437\u0434\u043d\u043e \u043f\u0440\u0438\u0441\u0443\u0442\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u043d\u0430 \u043c\u0435\u0441\u0442\u0435 x<sub>0<\/sub>. <\/p>\n<p>\u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0447\u0438\u0441\u043b\u043e 100 \u0434\u0430\u0451\u0442 100 \u043e\u0441\u0442\u0430\u0442\u043a\u043e\u0432 \u043e\u0442 0 \u0434\u043e 99 (\u043e\u0441\u0442\u0430\u0442\u043e\u043a 100 \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043d\u0438\u043a\u0430\u043a \u043d\u0435 \u0441\u043c\u043e\u0436\u0435\u043c, \u043d\u0430\u0434\u0435\u044e\u0441\u044c, \u0447\u0442\u043e \u044d\u0442\u043e \u0432\u043f\u043e\u043b\u043d\u0435 \u043e\u0447\u0435\u0432\u0438\u0434\u043d\u043e). \u0421\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u0435\u0441\u043b\u0438 \u0434\u0435\u043b\u0438\u0442\u0435\u043b\u044c \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0432\u0435\u043d 100, \u0442\u043e \u0438 \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u0430\u044f \u0434\u043b\u0438\u043d\u0430 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0432\u043d\u0430 100. \u0415\u0441\u043b\u0438 \u0434\u043b\u0438\u043d\u0430 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u0432 \u044d\u0442\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0443 \u043d\u0430\u0441 \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0432\u043d\u0430 100, \u0442\u043e 101-\u0439 \u0435\u0435 \u0447\u043b\u0435\u043d \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0432\u0435\u043d \u043f\u0435\u0440\u0432\u043e\u043c\u0443, 102-\u0439 \u2013 \u0432\u0442\u043e\u0440\u043e\u043c\u0443, \u0438 \u0442.\u0434. \u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u043d\u0430\u0447\u0438\u043d\u0430\u044f \u0441\u043e 101-\u0447\u043b\u0435\u043d\u0430, \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043c \u043d\u043e\u0432\u044b\u0439 \u0432\u0438\u0442\u043e\u043a \u0446\u0438\u043a\u043b\u0430, \u0438 \u0442\u0430\u043a \u0434\u043e \u0431\u0435\u0441\u043a\u043e\u043d\u0435\u0447\u043d\u043e\u0441\u0442\u0438. <\/p>\n<p>\u0412 \u0442\u043e \u0436\u0435 \u0432\u0440\u0435\u043c\u044f \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0438 \u043d\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u0443\u044e \u0434\u043b\u0438\u043d\u0443 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u2013 \u0432\u0441\u0435 \u0437\u0430\u0432\u0438\u0441\u0438\u0442 \u043e\u0442 \u0442\u043e\u0433\u043e, \u043d\u0430\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0445\u043e\u0440\u043e\u0448\u043e \u043f\u043e\u0434\u043e\u0431\u0440\u0430\u043d\u044b \u0437\u0430\u0434\u0430\u044e\u0449\u0438\u0435 \u0435\u0435 \u0447\u0438\u0441\u043b\u0430. \u0411\u043e\u043b\u0435\u0435 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e \u043e\u0431\u043e \u0432\u0441\u0435\u0445 \u0442\u043e\u043d\u043a\u043e\u0441\u0442\u044f\u0445 \u0437\u0430\u0434\u0430\u0447\u0438 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0435\u0439 \u043f\u0440\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438 \u041b\u041a\u041c \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c <a href=\"https:\/\/ru.wikipedia.org\/wiki\/%D0%9B%D0%B8%D0%BD%D0%B5%D0%B9%D0%BD%D1%8B%D0%B9_%D0%BA%D0%BE%D0%BD%D0%B3%D1%80%D1%83%D1%8D%D0%BD%D1%82%D0%BD%D1%8B%D0%B9_%D0%BC%D0%B5%D1%82%D0%BE%D0%B4\" rel=\"noopener noreferrer nofollow\">\u0432 \u0442\u043e\u0439 \u0436\u0435 \u0412\u0438\u043a\u0438<\/a>. <\/p>\n<h3>\u041d\u0435\u043c\u043d\u043e\u0433\u043e \u043e \u0442\u0435\u0440\u043c\u0438\u043d\u0430\u0445<\/h3>\n<p>\u0426\u0435\u043b\u043e\u0435 \u0447\u0438\u0441\u043b\u043e a \u043d\u0430\u0437\u044b\u0432\u0430\u044e\u0442 <strong><em>\u0441\u0440\u0430\u0432\u043d\u0438\u043c\u044b\u043c \u043f\u043e \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u043e\u043c\u0443 \u043c\u043e\u0434\u0443\u043b\u044e m<\/em><\/strong> (m \u2013 \u0446\u0435\u043b\u043e\u0435 \u0447\u0438\u0441\u043b\u043e) \u0441 \u0447\u0438\u0441\u043b\u043e\u043c b, \u0432 \u0442\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435, \u0435\u0441\u043b\u0438 \u043f\u0440\u0438 \u0434\u0435\u043b\u0435\u043d\u0438\u0438 \u043d\u0430 m \u043e\u0431\u0430 \u0447\u0438\u0441\u043b\u0430 a \u0438 b \u0434\u0430\u044e\u0442 \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u044b\u0439 \u043e\u0441\u0442\u0430\u0442\u043e\u043a. \u042d\u0442\u043e \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0442\u0430\u043a: <code>a \u2261 \u00a0b (mod m)<\/code>.<\/p>\n<p>\u0418\u0442\u0430\u043a, \u0447\u0438\u0441\u043b\u0430 23 \u0438 103 \u0434\u0430\u044e\u0442 \u043e\u0441\u0442\u0430\u0442\u043e\u043a 3 \u043f\u0440\u0438 \u0434\u0435\u043b\u0435\u043d\u0438\u0438 \u043d\u0430 10, \u0437\u043d\u0430\u0447\u0438\u0442 23 \u0441\u0440\u0430\u0432\u043d\u0438\u043c\u043e \u0441\u043e 103 \u043f\u043e \u043c\u043e\u0434\u0443\u043b\u044e 10 (23 \u2261 \u00a0103 (mod 10)).\u00a0 <\/p>\n<p>\u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u0432 \u0440\u0443\u0441\u0441\u043a\u043e\u044f\u0437\u044b\u0447\u043d\u043e\u0439 \u043c\u0430\u0442\u0435\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u043b\u0438\u0442\u0435\u0440\u0430\u0442\u0443\u0440\u0435 \u0443 \u0442\u0435\u0440\u043c\u0438\u043d\u0430 \u00ab\u043c\u043e\u0434\u0443\u043b\u044c\u00bb \u0435\u0441\u0442\u044c \u0434\u0432\u0430 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f: <\/p>\n<ul>\n<li>\n<p>\u0430\u0431\u0441\u043e\u043b\u044e\u0442\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0447\u0438\u0441\u043b\u0430;    <\/p>\n<\/li>\n<li>\n<p>\u0434\u0435\u043b\u0438\u0442\u0435\u043b\u044c \u0432 \u0430\u0440\u0438\u0444\u043c\u0435\u0442\u0438\u043a\u0435 \u043e\u0441\u0442\u0430\u0442\u043a\u043e\u0432.     <\/p>\n<\/li>\n<\/ul>\n<p>\u041c\u043d\u0435 \u043d\u0435 \u044f\u0441\u043d\u043e, \u043f\u043e\u0447\u0435\u043c\u0443 \u0430\u0431\u0441\u043e\u043b\u044e\u0442\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0443 \u043d\u0430\u0441 \u043d\u0430\u0437\u044b\u0432\u0430\u044e\u0442 \u00ab\u043c\u043e\u0434\u0443\u043b\u0435\u043c\u00bb. \u0412 \u0442\u043e\u0439 \u0436\u0435 \u0430\u043d\u0433\u043b\u043e\u044f\u0437\u044b\u0447\u043d\u043e\u0439 \u043b\u0438\u0442\u0435\u0440\u0430\u0442\u0443\u0440\u0435 \u0430\u0431\u0441\u043e\u043b\u044e\u0442\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0442\u0430\u043a \u0438 \u043f\u0435\u0440\u0435\u0434\u0430\u0435\u0442\u0441\u044f \u2013 <em>absolute [value]<\/em>. \u0415\u0441\u043b\u0438 \u0443 \u043a\u043e\u0433\u043e-\u043b\u0438\u0431\u043e \u0438\u0437 \u0443\u0432\u0430\u0436\u0430\u0435\u043c\u044b\u0445 \u0447\u0438\u0442\u0430\u0442\u0435\u043b\u0435\u0439 \u0435\u0441\u0442\u044c \u043e\u0442\u0432\u0435\u0442 \u043d\u0430 \u0442\u043e, \u043f\u043e\u0447\u0435\u043c\u0443 \u0440\u0443\u0441\u0441\u043a\u043e\u044f\u0437\u044b\u0447\u043d\u044b\u0439 \u0442\u0435\u0440\u043c\u0438\u043d \u00ab\u043c\u043e\u0434\u0443\u043b\u044c\u00bb \u0438\u043c\u0435\u0435\u0442 \u043a\u0430\u043a \u043c\u0438\u043d\u0438\u043c\u0443\u043c \u0434\u0432\u0430 \u043c\u0430\u0442\u0435\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f, \u0442\u043e \u0435\u0433\u043e \u0432\u0441\u0435\u0433\u0434\u0430 \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0432\u043d\u0438\u0437\u0443 \u0432 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u044f\u0445 \u2013 \u043d\u0435 \u0441\u0442\u0435\u0441\u043d\u044f\u0439\u0442\u0435\u0441\u044c. <\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043f\u0435\u0440\u0435\u0439\u0434\u0435\u043c \u043a \u0432\u043e\u043f\u0440\u043e\u0441\u0443 \u043e \u0442\u043e\u043c, \u043f\u043e\u0447\u0435\u043c\u0443 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043a\u043e\u043d\u0433\u0440\u0443\u044d\u043d\u0442\u043d\u044b\u043c. \u0421\u0430\u043c\u043e \u043f\u043e\u043d\u044f\u0442\u0438\u0435 \u043a\u043e\u043d\u0433\u0440\u0443\u044d\u043d\u0442\u043d\u043e\u0441\u0442\u0438 \u0432\u0435\u0441\u044c\u043c\u0430 \u0438 \u0432\u0435\u0441\u044c\u043c\u0430 \u043c\u043d\u043e\u0433\u043e\u0437\u043d\u0430\u0447\u043d\u043e\u0435, \u0441\u0432\u043e\u0451 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u044d\u0442\u043e\u0442 \u0442\u0435\u0440\u043c\u0438\u043d \u0438\u043c\u0435\u0435\u0442 \u0438 \u0432 \u0430\u043d\u0430\u0442\u043e\u043c\u0438\u0438, \u0438 \u0432 \u043f\u0441\u0438\u0445\u043e\u043b\u043e\u0433\u0438\u0438. \u041d\u043e \u0435\u0441\u043b\u0438 \u0432\u0437\u044f\u0442\u044c \u0441\u0444\u0435\u0440\u0443, \u0431\u043e\u043b\u0435\u0435 \u0431\u043b\u0438\u0437\u043a\u0443\u044e \u043a \u0442\u0435\u043c\u0435 \u0434\u0430\u043d\u043d\u043e\u0433\u043e \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u044f, \u0442\u043e \u0432 \u043c\u0430\u0442\u0435\u043c\u0430\u0442\u0438\u043a\u0435 \u043f\u043e\u043d\u044f\u0442\u0438\u0435 \u043a\u043e\u043d\u0433\u0440\u0443\u044d\u043d\u0442\u043d\u043e\u0441\u0442\u0438 \u043c\u043e\u0436\u043d\u043e \u0432\u0441\u0442\u0440\u0435\u0442\u0438\u0442\u044c \u0432 \u0433\u0435\u043e\u043c\u0435\u0442\u0440\u0438\u0438. \u041a\u0430\u043a \u0433\u043e\u0432\u043e\u0440\u0438\u0442 \u0432\u0441\u044f \u0442\u0430 \u0436\u0435 \u0412\u0438\u043a\u0438, <strong><em>\u043a\u043e\u043d\u0433\u0440\u0443\u044d\u043d\u0442\u043d\u043e\u0441\u0442\u044c<\/em><\/strong> \u2013 \u044d\u0442\u043e \u043e\u0442\u043d\u043e\u0448\u0435\u043d\u0438\u0435 \u044d\u043a\u0432\u0438\u0432\u0430\u043b\u0435\u043d\u0442\u043d\u043e\u0441\u0442\u0438 \u043d\u0430 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u0435 \u0433\u0435\u043e\u043c\u0435\u0442\u0440\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0444\u0438\u0433\u0443\u0440. \u041a\u0430\u043a, \u044f \u043d\u0430\u0434\u0435\u044e\u0441\u044c, \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u043e, \u0447\u0438\u0442\u0430\u0442\u0435\u043b\u044f\u043c, \u0441\u0438\u043c\u0432\u043e\u043b &#171;\u2261&#187; \u0442\u0430\u043a\u0436\u0435 \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442 \u044d\u043a\u0432\u0438\u0432\u0430\u043b\u0435\u043d\u0442\u043d\u043e\u0441\u0442\u044c. <\/p>\n<p>\u0412 \u0434\u0430\u043d\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0433\u0435\u043e\u043c\u0435\u0442\u0440\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0442\u0435\u0440\u043c\u0438\u043d\u0430 \u0438\u043c\u0435\u0435\u0442 \u0434\u043b\u044f \u043d\u0430\u0441 \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u0442\u0443 \u0436\u0435 \u0446\u0435\u043d\u043d\u043e\u0441\u0442\u044c, \u0447\u0442\u043e \u0438 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u043a\u043e\u043d\u0433\u0440\u0443\u044d\u043d\u0442\u043d\u043e\u0441\u0442\u0438 \u0432 \u043f\u0441\u0438\u0445\u043e\u043b\u043e\u0433\u0438\u0438. \u0414\u0430, \u0440\u0435\u0447\u044c \u0438\u0434\u0435\u0442 \u043e \u043d\u0435\u043a\u043e\u0435\u043c \u043e\u0442\u043d\u043e\u0448\u0435\u043d\u0438\u0438 \u044d\u043a\u0432\u0438\u0432\u0430\u043b\u0435\u043d\u0442\u043d\u043e\u0441\u0442\u0438, \u043d\u043e \u043d\u0435 \u0431\u043e\u043b\u0435\u0435 \u0442\u043e\u0433\u043e\u2026 \u0411\u043e\u043b\u0435\u0435 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0442\u0438\u0432\u043d\u043e\u0439 \u0431\u0443\u0434\u0435\u0442 <a href=\"https:\/\/ru.wikipedia.org\/wiki\/%D0%9A%D0%BE%D0%BD%D0%B3%D1%80%D1%83%D1%8D%D0%BD%D1%86%D0%B8%D1%8F\" rel=\"noopener noreferrer nofollow\">\u0441\u0442\u0430\u0442\u044c\u044f<\/a>, \u0440\u0430\u0441\u043a\u0440\u044b\u0432\u0430\u044e\u0449\u0430\u044f \u043f\u043e\u043d\u044f\u0442\u0438\u0435 \u00ab\u043a\u043e\u043d\u0433\u0440\u0443\u044d\u043d\u0446\u0438\u044f\u00bb. <\/p>\n<p>\u0418\u0442\u0430\u043a, \u043c\u043e\u0436\u043d\u043e \u0441\u043a\u0430\u0437\u0430\u0442\u044c, \u0447\u0442\u043e \u0441\u0430\u043c\u044b\u043c \u0447\u0430\u0441\u0442\u043e \u043f\u0440\u0438\u0432\u043e\u0434\u044f\u0449\u0438\u043c\u0441\u044f \u0432 \u043f\u0440\u0438\u043c\u0435\u0440\u043e\u043c \u043e\u0442\u043d\u043e\u0448\u0435\u043d\u0438\u044f \u044d\u043a\u0432\u0438\u0432\u0430\u043b\u0435\u043d\u0442\u043d\u043e\u0441\u0442\u0438 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0441\u0440\u0430\u0432\u043d\u0438\u043c\u043e\u0441\u0442\u044c \u0434\u0432\u0443\u0445 \u0447\u0438\u0441\u0435\u043b \u043f\u043e \u043c\u043e\u0434\u0443\u043b\u044e. \u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u0441\u0440\u0430\u0432\u043d\u0438\u043c\u043e\u0441\u0442\u044c \u043f\u043e \u043c\u043e\u0434\u0443\u043b\u044e \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0447\u0430\u0441\u0442\u043d\u044b\u043c \u0441\u043b\u0443\u0447\u0430\u0435\u043c \u0442\u0430\u043a\u043e\u0433\u043e \u043e\u0442\u043d\u043e\u0448\u0435\u043d\u0438\u044f. \u0412\u043e\u0442 \u044d\u0442\u043e \u0443\u0436\u0435 \u043d\u0430\u043c\u043d\u043e\u0433\u043e \u0431\u043b\u0438\u0436\u0435 \u0438 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0442\u0438\u0432\u043d\u0435\u0435. \u0412 \u0430\u043d\u0433\u043b\u0438\u0439\u0441\u043a\u043e\u043c \u044f\u0437\u044b\u043a\u0435 \u0432\u0441\u0435 \u0435\u0449\u0435 \u0431\u043e\u043b\u0435\u0435 \u043f\u0440\u043e\u0437\u0440\u0430\u0447\u043d\u0435\u0435, \u0444\u0440\u0430\u0437\u0430 \u00aba \u0438 b \u0441\u0440\u0430\u0432\u043d\u0438\u043c\u044b \u043f\u043e \u043c\u043e\u0434\u0443\u043b\u044e m\u00bb \u0442\u0430\u043a \u0438 \u0437\u0432\u0443\u0447\u0438\u0442: <em>a and b are congruent modulo m<\/em>. \u00a0<\/p>\n<p>\u0422\u0430\u043a \u043f\u043e\u0447\u0435\u043c\u0443 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u0438\u043c\u0435\u043d\u043d\u043e \u043a\u043e\u043d\u0433\u0440\u0443\u044d\u043d\u0442\u043d\u044b\u0439? \u0410 \u0432\u0441\u0451 \u0434\u0435\u043b\u043e \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u043f\u0440\u0438 \u0435\u0433\u043e \u0440\u0430\u0431\u043e\u0442\u0435 \u0432\u044b\u0447\u0438\u0441\u043b\u044f\u044e\u0442\u0441\u044f \u0434\u0432\u0430 \u0447\u0438\u0441\u043b\u0430, \u0441\u0440\u0430\u0432\u043d\u0438\u043c\u044b\u0435 \u043f\u043e \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u043e\u043c\u0443 \u043c\u043e\u0434\u0443\u043b\u044e. \u00a0\u00a0<\/p>\n<p>\u041f\u0435\u0440\u0432\u043e\u0435 \u0447\u0438\u0441\u043b\u043e \u2013 \u044d\u0442\u043e \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u0432 \u0441\u043a\u043e\u0431\u043a\u0430\u0445: (x<sub>0<\/sub> * a + c ). \u0412\u0442\u043e\u0440\u043e\u0435 \u0447\u0438\u0441\u043b\u043e (x<sub>1<\/sub>) \u2013 \u044d\u0442\u043e \u043e\u0441\u0442\u0430\u0442\u043e\u043a \u043e\u0442 \u0434\u0435\u043b\u0435\u043d\u0438\u044f \u043f\u0435\u0440\u0432\u043e\u0433\u043e \u0447\u0438\u0441\u043b\u0430 \u043d\u0430 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u043e\u0434\u0443\u043b\u044c: <\/p>\n<p><code>x1 = (x0 * a + c ) MOD m.<\/code><\/p>\n<p>\u0422\u043e \u0435\u0441\u0442\u044c, \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c: <code>(x<sub>0<\/sub>*a + c ) \u2261 ((x<sub>0<\/sub>*a + c ) MOD m) (mod m)<\/code>, <br \/>\u0433\u0434\u0435 <code>MOD m<\/code> \u2013 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u044f \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u043e\u0441\u0442\u0430\u0442\u043a\u0430 \u0434\u0435\u043b\u0435\u043d\u0438\u0438 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0446\u0435\u043b\u043e\u0433\u043e \u0447\u0438\u0441\u043b\u0430 \u043d\u0430 \u0446\u0435\u043b\u043e\u0435 \u0447\u0438\u0441\u043b\u043e m (\u0446\u0435\u043b\u043e\u0447\u0438\u0441\u043b\u0435\u043d\u043d\u043e\u0435 \u0434\u0435\u043b\u0435\u043d\u0438\u0435).\u00a0\u00a0 \u00a0<\/p>\n<h3>\u041b\u041a\u041c \u0432 VBA Excel<\/h3>\n<p>\u0418\u0442\u0430\u043a, \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u0432\u0448\u0438\u0441\u044c \u0441 \u0442\u0435\u043e\u0440\u0438\u0435\u0439 \u0438 \u0442\u0435\u0440\u043c\u0438\u043d\u043e\u043b\u043e\u0433\u0438\u0435\u0439, \u043c\u043e\u0436\u043d\u043e \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u0442\u044c \u043a \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0435. \u0421\u043e\u0433\u043b\u0430\u0441\u043d\u043e \u0412\u0438\u043a\u0438, \u0432 VBA \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u0441\u043e \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c\u0438 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430\u043c\u0438:<br \/><strong><em>\u0430<\/em><\/strong> (\u043c\u043d\u043e\u0436\u0438\u0442\u0435\u043b\u044c) \u2013 1140671485 (43FD43FD<sub>16<\/sub>);<br \/><strong><em>\u0441<\/em><\/strong> (\u043f\u0440\u0438\u0440\u0430\u0449\u0435\u043d\u0438\u0435) \u2013 12820163 (C39EC3<sub>16<\/sub>);<br \/><strong><em>m<\/em><\/strong> (\u043c\u043e\u0434\u0443\u043b\u044c) \u2013 2<sup>24<\/sup> (16777216 \u0438\u043b\u0438 1000000<sub>16<\/sub>).<\/p>\n<p>\u0414\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u0438\u0437\u0431\u0435\u0436\u0430\u0442\u044c \u043d\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u0441\u0442\u0438, \u0441\u043a\u0430\u0436\u0443, \u0447\u0442\u043e \u0447\u0438\u0441\u043b\u0430, \u0437\u0430\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0435 &#171;\u043a\u0430\u043a \u0435\u0441\u0442\u044c&#187; \u0431\u0435\u0437 \u0432\u0441\u044f\u043a\u0438\u0445 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u043f\u043e\u0441\u0442\u0444\u0438\u043a\u0441\u043e\u0432 &#8212; \u0432\u0441\u0435\u0433\u0434\u0430 \u0431\u0443\u0434\u0443\u0442 \u043e\u0437\u043d\u0430\u0447\u0430\u0442\u044c \u0447\u0438\u0441\u043b\u0430 \u0432 \u0434\u0435\u0441\u044f\u0442\u0438\u0447\u043d\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u0435 \u0441\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f. \u0410 \u0447\u0438\u0441\u043b\u0430 \u0441 \u043f\u043e\u0441\u0442\u0444\u0438\u043a\u0441\u043e\u043c <sub>16<\/sub> \u0431\u0443\u0434\u0443\u0442 \u043e\u0437\u043d\u0430\u0447\u0430\u0442\u044c \u0447\u0438\u0441\u043b\u0430 \u0432 16-\u0440\u0438\u0447\u043d\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u0435 \u0441\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f. \u0415\u0441\u043b\u0438 \u043a\u0442\u043e-\u0442\u043e \u043f\u0440\u0435\u0434\u043f\u043e\u0447\u0438\u0442\u0430\u0435\u0442 \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c <sub>hex<\/sub>, \u043f\u0440\u043e\u0448\u0443 \u0441\u0438\u043b\u044c\u043d\u043e \u043d\u0435 \u0440\u0443\u0433\u0430\u0442\u044c\u0441\u044f&#8230;  <\/p>\n<p>\u0410 \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a \u044d\u0442\u0438\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u2013 \u0441\u0442\u0430\u0440\u0430\u044f \u043d\u044b\u043d\u0435 \u043d\u0435\u0434\u043e\u0441\u0442\u0443\u043f\u043d\u0430\u044f \u0441\u043f\u0440\u0430\u0432\u043a\u0430 Microsoft, \u043a\u043e\u043f\u0438\u044f \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u0430 \u0432 <a href=\"https:\/\/web.archive.org\/web\/20110417000838\/http:\/\/support.microsoft.com\/kb\/231847\" rel=\"noopener noreferrer nofollow\">\u0446\u0438\u0444\u0440\u043e\u0432\u043e\u043c \u0430\u0440\u0445\u0438\u0432\u0435<\/a>.<\/p>\n<p>\u041e\u0442\u0442\u0443\u0434\u0430 \u0436\u0435 \u043c\u044b \u0431\u0435\u0440\u0435\u043c \u0438 \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 <strong><em>x<sub>0<\/sub><\/em><\/strong> \u2013 327680 (5000<sub>16<\/sub>). <\/p>\n<p>\u0412 \u0442\u043e \u0436\u0435 \u0432\u0440\u0435\u043c\u044f \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0434\u0440\u0443\u0433\u0438\u0435 \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u0438 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, <a href=\"https:\/\/en.wikibooks.org\/wiki\/Visual_Basic_for_Applications\/A_PRNG_for_VBA\" rel=\"noopener noreferrer nofollow\">\u044d\u0442\u043e\u0442<\/a>) \u0434\u0430\u044e\u0442 \u0434\u0440\u0443\u0433\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043c\u043d\u043e\u0436\u0438\u0442\u0435\u043b\u044f: 16598013 (FD43FD<sub>16<\/sub>).<\/p>\n<p>\u0421\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u044f \u044d\u0442\u0438 \u0434\u0432\u0430 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u2013 1140671485 (43FD43FD<sub>16<\/sub>) \u0438 16598013 (FD43FD<sub>16<\/sub>) \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u043c\u0435\u0442\u0438\u0442\u044c, \u0447\u0442\u043e \u0432 16-\u0440\u0438\u0447\u043d\u043e\u043c \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0438 \u043e\u0431\u0430 \u044d\u0442\u0438 \u0447\u0438\u0441\u043b\u0430 \u0438\u043c\u0435\u044e\u0442 \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u044b\u0435 6 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0445 \u0440\u0430\u0437\u0440\u044f\u0434\u043e\u0432. \u041f\u0440\u0438 \u044d\u0442\u043e\u043c \u043e\u0431\u0430 \u043e\u043d\u0438 \u0434\u0430\u0434\u0443\u0442 \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u044b\u0439 \u043e\u0441\u0442\u0430\u0442\u043e\u043a \u043f\u0440\u0438 \u0434\u0435\u043b\u0435\u043d\u0438\u0438 \u043d\u0430 2<sup>24<\/sup> (1000000<sub>16<\/sub>). <\/p>\n<p>\u0412 16-\u0440\u0438\u0447\u043d\u043e\u043c \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0438 \u044d\u0442\u043e \u0432\u0438\u0434\u043d\u043e \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u043d\u0430\u0433\u043b\u044f\u0434\u043d\u043e. \u041f\u043e\u043d\u044f\u0442\u043d\u043e, \u0447\u0442\u043e 16598013 \u043f\u0440\u0438 \u0434\u0435\u043b\u0435\u043d\u0438\u0438 \u043d\u0430 16777216 \u0434\u0430\u0441\u0442 \u043e\u0441\u0442\u0430\u0442\u043e\u043a 16598013 (FD43FD<sub>16<\/sub>). \u041d\u043e \u0438 43FD43FD<sub>16 <\/sub>\u043f\u0440\u0438 \u0434\u0435\u043b\u0435\u043d\u0438\u0438 \u043d\u0430 1000000<sub>16\u00a0 <\/sub>\u0434\u0430\u0441\u0442 \u0442\u0430\u043a\u043e\u0439 \u0436\u0435 \u043e\u0441\u0442\u0430\u0442\u043e\u043a (FD43FD<sub>16<\/sub>). \u0414\u043b\u044f \u043d\u0430\u0438\u043b\u0443\u0447\u0448\u0435\u0433\u043e \u043f\u043e\u043d\u0438\u043c\u0430\u043d\u0438\u044f: <\/p>\n<p><code>43FD43FD<sub>16 <\/sub>= 43<sub>16<\/sub>*1000000<sub>16<\/sub> + FD43FD<sub>16<\/sub><\/code>.<\/p>\n<p>\u0421\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u043f\u043e \u043f\u0440\u0430\u0432\u0438\u043b\u0430\u043c \u043c\u043e\u0434\u0443\u043b\u044c\u043d\u043e\u0439 \u0430\u0440\u0438\u0444\u043c\u0435\u0442\u0438\u043a\u0438 \u043e\u0431\u0430 \u0447\u0438\u0441\u043b\u0430 (\u0438 1140671485, \u0438 16598013) \u043c\u043e\u0433\u0443\u0442 \u0441 \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u044b\u043c \u0443\u0441\u043f\u0435\u0445\u043e\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0432 \u0443\u0436\u0435 \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u043e\u043c \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0435 VBA. \u0422\u043e \u0435\u0441\u0442\u044c, \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043c\u043d\u043e\u0436\u0438\u0442\u0435\u043b\u044f \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0441\u0440\u0430\u0432\u043d\u0438\u043c\u044b\u0435 \u043f\u043e \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u043e\u043c\u0443 \u043c\u043e\u0434\u0443\u043b\u044e \u0447\u0438\u0441\u043b\u0430 (\u0432 \u0434\u0430\u043d\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043e\u043d\u0438 \u0431\u0443\u0434\u0443\u0442 \u044d\u043a\u0432\u0438\u0432\u0430\u043b\u0435\u043d\u0442\u043d\u044b), \u0438 \u043e\u0431\u0430 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u0434\u0430\u0434\u0443\u0442 \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u043d\u043e\u0433\u043e \u043e\u0441\u0442\u0430\u0442\u043a\u0430. \u0422\u0435\u043e\u0440\u0435\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u0434\u043e\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c\u0441\u0442\u0432\u043e \u044d\u0442\u043e\u0433\u043e \u0444\u0430\u043a\u0442\u0430 \u044f \u043e\u0441\u0442\u0430\u0432\u043b\u044e \u0432\u043d\u0435 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0430 \u0434\u0430\u043d\u043d\u043e\u0439 \u0440\u0430\u0431\u043e\u0442\u044b. \u041f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0436\u0435 \u0432 \u044d\u0442\u043e\u043c \u043c\u043e\u0436\u0435\u0442 \u0443\u0431\u0435\u0434\u0438\u0442\u044c\u0441\u044f \u043a\u0430\u0436\u0434\u044b\u0439. \u042d\u0442\u043e \u043c\u043e\u0436\u0435\u0442 \u043b\u0435\u0433\u043a\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u043a\u0430\u0436\u0434\u044b\u0439, \u043f\u043e\u0434\u0441\u0442\u0430\u0432\u0438\u0432 \u0432 \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u0439 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u043e\u0431\u0430 \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u043d\u044b\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f.<\/p>\n<p>\u0422\u043e \u0435\u0441\u0442\u044c,<br \/><code>(327680*1140671485 + 12820163) MOD 16777216<\/code><br \/> \u0434\u0430\u0441\u0442 \u0442\u0430\u043a\u043e\u0439 \u0436\u0435 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442, \u0447\u0442\u043e \u0438<em><br \/><\/em><code><em>(327680*<\/em>16598013 + 12820163) MOD 16777216.<\/code><\/p>\n<p>\u041a\u0430\u0441\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u0442\u043e\u0433\u043e, \u043f\u043e\u0447\u0435\u043c\u0443 \u0432 \u0440\u0430\u0437\u043d\u044b\u0445 \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u0430\u0445 \u0444\u0438\u0433\u0443\u0440\u0438\u0440\u0443\u0435\u0442 \u0434\u0432\u0430 \u0440\u0430\u0437\u043d\u044b\u0445 \u0447\u0438\u0441\u043b\u0430 \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043c\u043d\u043e\u0436\u0438\u0442\u0435\u043b\u044f, \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u043e\u0436\u0438\u0442\u044c, \u0447\u0442\u043e \u0447\u0438\u0441\u043b\u043e 16 598\u00a0013 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u043e\u0441\u044c \u043d\u0430 \u0441\u0442\u0430\u0440\u044b\u0445 32-\u0440\u0430\u0437\u0440\u044f\u0434\u043d\u044b\u0445 \u0441\u0438\u0441\u0442\u0435\u043c\u0430\u0445 \u0434\u043e \u0432\u0435\u0440\u0441\u0438\u0438 VB 6.0 \u0432\u043a\u043b\u044e\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e (\u0432 \u043a\u043b\u0430\u0441\u0441\u0438\u0447\u0435\u0441\u043a\u043e\u043c VBA), \u0430 \u0447\u0438\u0441\u043b\u043e 1 140 671 485, \u0441\u043a\u043e\u0440\u0435\u0435 \u0432\u0441\u0435\u0433\u043e, \u0441\u0442\u0430\u043b\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0443\u0436\u0435 \u043d\u0430 64-\u0440\u0430\u0437\u0440\u044f\u0434\u043d\u044b\u0445 \u0441\u0438\u0441\u0442\u0435\u043c\u0430\u0445 \u0438 \u0432 VBA \u043d\u0430\u0447\u0438\u043d\u0430\u044f \u0441 7-\u0439 \u0432\u0435\u0440\u0441\u0438\u0438 (VB. NET). \u00a0\u00a0\u00a0<\/p>\n<p>\u041d\u043e, \u043a\u0430\u043a \u0443\u0436\u0435 \u0431\u044b\u043b\u043e \u043f\u043e\u043a\u0430\u0437\u0430\u043d\u043e, \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u043e\u0441\u043d\u043e\u0432\u0430\u043d\u0438\u0439 \u0434\u043b\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0431<strong><em>\u043e<\/em><\/strong>\u043b\u044c\u0448\u0435\u0433\u043e \u0447\u0438\u0441\u043b\u0430 \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043c\u043d\u043e\u0436\u0438\u0442\u0435\u043b\u044f, \u043d\u0430 \u043f\u0435\u0440\u0432\u044b\u0439 \u0432\u0437\u0433\u043b\u044f\u0434 \u043d\u0435\u0442. \u041e\u0431\u0430 \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u0445 \u043c\u043d\u043e\u0436\u0438\u0442\u0435\u043b\u044f \u0434\u0430\u044e\u0442 \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u044b\u0439 \u043e\u0441\u0442\u0430\u0442\u043e\u043a \u043f\u0440\u0438 \u0440\u0430\u0431\u043e\u0442\u0435 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430, \u043d\u043e \u043f\u0440\u0438 \u044d\u0442\u043e\u043c, \u043b\u043e\u0433\u0438\u0447\u043d\u043e \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u043e\u0436\u0438\u0442\u044c, \u0447\u0442\u043e \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u0441 \u0447\u0438\u0441\u043b\u043e\u043c 1140671485 \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u044e\u0442 \u0431\u043e\u043b\u044c\u0448\u0435 \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432. \u041e\u0442\u0432\u0435\u0442\u0430 \u043d\u0430 \u0432\u043e\u043f\u0440\u043e\u0441, \u043f\u043e\u0447\u0435\u043c\u0443 \u0432 Microsoft \u0440\u0435\u0448\u0438\u043b\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0431<strong><em>\u043e<\/em><\/strong>\u043b\u044c\u0448\u0435\u0435 \u0447\u0438\u0441\u043b\u043e, \u0443 \u043c\u0435\u043d\u044f \u043f\u043e\u043a\u0430 \u043d\u0435\u0442. <\/p>\n<p>\u0418\u0442\u0430\u043a, \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0438 \u043f\u0440\u0430\u0432\u0438\u043b\u043e \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u043e\u0441\u0442\u0430\u0442\u043a\u0430, \u0438, \u0442\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u043c\u043e\u0436\u0435\u043c \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u044c \u0432\u0441\u044e \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c. \u0417\u0430\u0431\u0435\u0433\u0430\u044f \u0432\u043f\u0435\u0440\u0435\u0434, \u043d\u0443\u0436\u043d\u043e \u043e\u0442\u043c\u0435\u0442\u0438\u0442\u044c, \u0447\u0442\u043e \u0432 Microsoft \u0432\u0435\u0441\u044c\u043c\u0430 \u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u043f\u043e\u0434\u043e\u0448\u043b\u0438 \u043a \u0432\u044b\u0431\u043e\u0440\u0443 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u0441\u0432\u043e\u0435\u0433\u043e \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430 \u0438 \u043f\u0440\u0438 \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f\u0445 \u043c\u043d\u043e\u0436\u0438\u0442\u0435\u043b\u044f, \u043f\u0440\u0438\u0440\u0430\u0449\u0435\u043d\u0438\u044f \u0438 \u043c\u043e\u0434\u0443\u043b\u044f \u0434\u043b\u0438\u043d\u0430 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u0431\u0443\u0434\u0435\u0442 \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0439 (16777216 \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439, \u0447\u0442\u043e \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044e \u043c\u043e\u0434\u0443\u043b\u044f).\u00a0\u00a0 <\/p>\n<p>\u041d\u043e \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435 \u043e\u0441\u0442\u0430\u0442\u043a\u0430 \u2013 \u044d\u0442\u043e \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u043b\u043e\u0432\u0438\u043d\u0430 \u0434\u0435\u043b\u0430. \u0421\u0430\u043c\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435, \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u043c\u043e\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0435\u0439 Rnd() \u0432\u044b\u0447\u0438\u0441\u043b\u044f\u0435\u0442\u0441\u044f \u0442\u0430\u043a: <br \/><code>rnd = x<sub>1<\/sub>\/m. <\/code><br \/>\u0422\u0430\u043a \u043a\u0430\u043a x<sub>1<\/sub> \u0432\u0441\u0435\u0433\u0434\u0430 \u0431\u0443\u0434\u0435\u0442 \u043c\u0435\u043d\u044c\u0448\u0435 m, \u0442\u043e, \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e, 0 \u2264 rnd &lt; 1.<\/p>\n<p>\u0412 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e\u0439 \u043d\u0430 <\/p>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-469276","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/469276","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=469276"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/469276\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=469276"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=469276"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=469276"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}