{"id":340439,"date":"2022-10-29T21:00:14","date_gmt":"2022-10-29T21:00:14","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=340439"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=340439","title":{"rendered":"<span>\u0418\u0449\u0435\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0447\u0438\u0441\u043b\u0430 \u041f\u0438, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440 \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439<\/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<blockquote>\n<p><strong>\u041f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u044c\u0442\u0435, \u0447\u0442\u043e \u0443 \u0432\u0430\u0441 \u0435\u0441\u0442\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u044f random(), \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u044e\u0442 \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0432 \u043f\u0440\u043e\u043c\u0435\u0436\u0443\u0442\u043a\u0435 <img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"[0;1]\" alt=\"[0;1]\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/eff\/a38\/faa\/effa38faa5436724d67f327abc985718.svg\" width=\"39\" height=\"22\"\/><\/strong><\/p>\n<p><strong>\u0412\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0447\u0438\u0441\u043b\u0430 <img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"\\pi\" alt=\"\\pi\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/53a\/e25\/769\/53ae25769b33d60e49c4d6c60b6955d5.svg\" width=\"11\" height=\"12\"\/><\/strong><\/p>\n<\/blockquote>\n<p>\u042d\u0442\u043e \u043e\u0434\u0438\u043d \u0438\u0437 \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u044b\u0445 \u0432\u043e\u043f\u0440\u043e\u0441\u043e\u0432 \u043d\u0430 \u0441\u043e\u0431\u0435\u0441\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u0438 \u0432 \u0442\u043e\u043f\u043e\u0432\u0443\u044e  IT \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u044e<\/p>\n<p>\u0412 \u043f\u0435\u0440\u0432\u0443\u044e \u0441\u0435\u043a\u0443\u043d\u0434\u0443 \u043c\u043e\u0436\u0435\u0442 \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u044c\u0441\u044f, \u0447\u0442\u043e \u0432\u0430\u0448 \u0438\u043d\u0442\u0435\u0440\u0432\u044c\u044e\u0435\u0440 \u0441\u043b\u0435\u0433\u043a\u0430 \u0438\u0437\u0434\u0435\u0432\u0430\u0435\u0442\u0441\u044f \u043d\u0430\u0434 \u0432\u0430\u043c, \u043d\u043e \u0435\u0441\u043b\u0438 \u0432\u0441\u043f\u043e\u043c\u043d\u0438\u0442\u044c \u043e\u0441\u043d\u043e\u0432\u044b \u0438\u0437 \u0442\u0435\u043e\u0440\u0438\u0438 \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u0438, \u0442\u043e \u0432\u0441\u0435 \u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0441\u044f \u0433\u043e\u0440\u0430\u0437\u0434\u043e \u043f\u0440\u043e\u0449\u0435. Let&#8217;s go!<\/p>\n<h2>\u0411\u0430\u0437\u0430 \u0438\u0437 \u0442\u0435\u043e\u0440\u0438\u0438 \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u0438 <\/h2>\n<p><strong>\u041a\u043b\u0430\u0441\u0441\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u0438.<\/strong><\/p>\n<p>\u0412\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u044c, \u0447\u0442\u043e \u0441\u043e\u0431\u044b\u0442\u0438\u0435 A \u043f\u0440\u043e\u0438\u0437\u043e\u0439\u0434\u0435\u0442, \u0440\u0430\u0432\u043d\u043e \u043e\u0442\u043d\u043e\u0448\u0435\u043d\u0438\u044e \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0443 \u0431\u043b\u0430\u0433\u043e\u043f\u0440\u0438\u044f\u0442\u043d\u044b\u0445 \u0438\u0441\u0445\u043e\u0434\u043e\u0432 <img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"m\" alt=\"m\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/737\/341\/d73\/737341d73fc39d83abbf82f24901bc43.svg\" width=\"17\" height=\"12\"\/>\u043a \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0443 \u0432\u0441\u0435\u0445 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0445 \u0438\u0441\u0445\u043e\u0434\u043e\u0432 <img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"n\" alt=\"n\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/f11\/d67\/f29\/f11d67f2909546c97400e9b6a81b6b9b.svg\" width=\"12\" height=\"12\"\/><\/p>\n<p>\u041d\u0430 \u044f\u0437\u044b\u043a\u0435 \u043c\u0430\u0442\u0435\u043c\u0430\u0442\u0438\u043a\u0438 \u044d\u0442\u043e \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0442\u0430\u043a: <img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"P(A) = \\frac{m}{n}\" alt=\"P(A) = \\frac{m}{n}\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/fb1\/bc3\/319\/fb1bc33199650d893679a69e00dd205a.svg\" width=\"95\" height=\"38\"\/><\/p>\n<p>\u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u0443 \u043d\u0430\u0441 \u0435\u0441\u0442\u044c \u043a\u0443\u0431\u0438\u043a. \u041a\u0430\u043a\u0430\u044f \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u044c \u0447\u0442\u043e \u0432\u044b\u043f\u0430\u0434\u0435\u0442 \u0433\u0440\u0430\u043d\u044c \u0441 \u0447\u0435\u0442\u043d\u044b\u043c\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f\u043c\u0438?<\/p>\n<details class=\"spoiler\">\n<summary>\u0420\u0435\u0448\u0435\u043d\u0438\u0435<\/summary>\n<div class=\"spoiler__content\">\n<p>\u041d\u0430\u0431\u043e\u0440 \u0432\u0441\u0435\u0445 \u0438\u0441\u0445\u043e\u0434\u043e\u0432 {<img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"{1, 2, 3, 4, 5, 6}\" alt=\"{1, 2, 3, 4, 5, 6}\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/aeb\/a5f\/4fe\/aeba5f4fe7b68d8ab885f525c7b54e52.svg\" width=\"102\" height=\"20\"\/>} <img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"\\Rightarrow n=6\" alt=\"\\Rightarrow n=6\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/a8a\/f4a\/770\/a8af4a770ebdc4f73ea21c0021a0cd7b.svg\" width=\"73\" height=\"17\"\/><br \/>\u041d\u0430\u0431\u043e\u0440 \u0431\u043b\u0430\u0433\u043e\u043f\u0440\u0438\u044f\u0442\u043d\u044b\u0445 \u0438\u0441\u0445\u043e\u0434\u043e\u0432 <img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"A=\" alt=\"A=\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/406\/a17\/077\/406a17077db59506f7e43ec32df19040.svg\" width=\"35\" height=\"18\"\/>  {<img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"2, 4, 6\" alt=\"2, 4, 6\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/a83\/549\/622\/a8354962283ed3f37bf5c2ff8963e56f.svg\" width=\"47\" height=\"20\"\/>} <img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"\\Rightarrow m=3\" alt=\"\\Rightarrow m=3\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/bfb\/3c7\/b3c\/bfb3c7b3c15edbc56b0464a97fa81fd7.svg\" width=\"78\" height=\"17\"\/><br \/>\u0417\u043d\u0430\u0447\u0438\u0442 <img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"P(A) = \\frac{3}{6} = \\frac{1}{2}\" alt=\"P(A) = \\frac{3}{6} = \\frac{1}{2}\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/5d4\/371\/b4f\/5d4371b4f046f782b824326a1bd28627.svg\" width=\"130\" height=\"43\"\/><\/p>\n<\/div>\n<\/details>\n<p><strong>\u0413\u0435\u043e\u043c\u0435\u0442\u0440\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u0438.<\/strong><\/p>\n<p>\u041f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0435 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u0438 \u043e\u0442\u043b\u0438\u0447\u043d\u043e\u0435, \u043d\u043e \u043e\u043d\u043e \u043e\u0431\u043b\u0430\u0434\u0430\u0435\u0442 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u043c\u0438 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u043c\u0438 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u044f\u043c\u0438. \u041e\u0434\u043d\u0438\u043c \u0438\u0437 \u0442\u0430\u043a\u0438\u0445 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u0439 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0442\u043e\u0442 \u0444\u0430\u043a\u0442, \u0447\u0442\u043e \u043e\u043d\u043e \u043d\u0435\u043f\u0440\u0438\u043c\u0435\u043d\u0438\u043c\u043e \u043a \u0438\u0441\u043f\u044b\u0442\u0430\u043d\u0438\u044f\u043c \u0441 \u0431\u0435\u0441\u043a\u043e\u043d\u0435\u0447\u043d\u044b\u043c \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e\u043c \u0438\u0441\u0445\u043e\u0434\u043e\u0432.\u00a0<\/p>\n<p>\u0427\u0442\u043e\u0431\u044b \u0441\u0442\u0430\u043b\u043e \u043f\u043e\u043d\u044f\u0442\u043d\u043e \u043e \u0447\u0435\u043c \u0440\u0435\u0447\u044c &#8212; \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u0440\u0435\u0448\u0438\u043c \u0437\u0430\u0434\u0430\u0447\u043a\u0443.<\/p>\n<p>\u041d\u0430 \u043e\u0442\u0440\u0435\u0437\u043e\u043a <img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"[0;1]\" alt=\"[0;1]\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/97a\/01f\/abd\/97a01fabd885fd29d0464e36ea49161d.svg\" width=\"39\" height=\"22\"\/>\u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u0431\u0440\u043e\u0448\u0435\u043d\u0430 \u0442\u043e\u0447\u043a\u0430 <img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"M.\" alt=\"M.\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/79b\/199\/6c6\/79b1996c6fb56451ff0f36588884b8e5.svg\" width=\"26\" height=\"17\"\/>\u041d\u0430\u0439\u0434\u0438\u0442\u0435 \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u044c \u0442\u043e\u0433\u043e, \u0447\u0442\u043e \u043e\u043d\u0430 \u043f\u043e\u043f\u0430\u0434\u0435\u0442 \u0432 \u043f\u0440\u043e\u043c\u0435\u0436\u0443\u0442\u043e\u043a <img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"[0,5; 0,8]\" alt=\"[0,5; 0,8]\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/96c\/9a4\/112\/96c9a4112962713958721a0d516aed64.svg\" width=\"76\" height=\"22\"\/><\/p>\n<p>\u041f\u043e\u043d\u044f\u0442\u043d\u043e, \u0447\u0442\u043e \u0437\u0434\u0435\u0441\u044c \u043d\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u0441\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043a\u043b\u0430\u0441\u0441\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u043d\u0430 \u043e\u0442\u0440\u0435\u0437\u043a\u0435 \u0431\u0435\u0441\u043a\u043e\u043d\u0435\u0447\u043d\u043e \u043c\u043d\u043e\u0433\u043e \u0442\u043e\u0447\u0435\u043a. \u0422\u043e\u0433\u0434\u0430 \u043d\u0430\u043c \u0438\u0434\u0435\u0442 \u043d\u0430 \u043f\u043e\u043c\u043e\u0449\u044c \u0433\u0435\u043e\u043c\u0435\u0442\u0440\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 <\/p>\n<p>\u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u0438 <img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"P(A)=\\frac{S(A)}{S(\\Omega)}\" alt=\"P(A)=\\frac{S(A)}{S(\\Omega)}\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/6c5\/ba9\/8ff\/6c5ba98ff728a05059376f300e2bed87.svg\" width=\"120\" height=\"50\"\/>, \u0432 \u043d\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 <img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"S(A) = 0.8 - 0.5=0.3\" alt=\"S(A) = 0.8 - 0.5=0.3\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/232\/f30\/44e\/232f3044e8c5dcff098523d8d1f0057a.svg\" width=\"194\" height=\"22\"\/>, <img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"S(\\Omega)=1\" alt=\"S(\\Omega)=1\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/a40\/a1f\/fc4\/a40a1ffc43f3aa32f35b663a640cbce8.svg\" width=\"78\" height=\"22\"\/><\/p>\n<p>\u0421\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e <img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"P(A)=0,3\" alt=\"P(A)=0,3\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/fe7\/56b\/57f\/fe756b57fda74c6ee01e0f4442541e29.svg\" width=\"99\" height=\"22\"\/><\/p>\n<h2>\u0420\u0435\u0448\u0435\u043d\u0438\u0435 \u0437\u0430\u0434\u0430\u0447\u0438 <\/h2>\n<p><strong>\u041a\u043e\u043d\u0446\u0435\u043f\u0446\u0438\u044f<\/strong><\/p>\n<p>\u041f\u043e\u0441\u0442\u0440\u043e\u0438\u043c \u0433\u0435\u043e\u043c\u0435\u0442\u0440\u0438\u0447\u0435\u0441\u043a\u0443\u044e \u043c\u043e\u0434\u0435\u043b\u044c.<\/p>\n<p>\u0412\u0432\u0435\u0434\u0435\u043c \u0441\u0438\u0441\u0442\u0435\u043c\u0443 \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442 \u0441 \u043e\u0441\u044f\u043c\u0438 <img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"x\" alt=\"x\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/256\/945\/6f5\/2569456f52cf40b7c84726bdb7bb0b85.svg\" width=\"11\" height=\"12\"\/>\u0438 <img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"y\" alt=\"y\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/f7a\/94b\/b29\/f7a94bb29aa609bb6f37dfa39a03f5f8.svg\" width=\"10\" height=\"16\"\/><br \/>\u0420\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0438\u043c \u043a\u0432\u0430\u0434\u0440\u0430\u0442 \u0441 \u0435\u0434\u0438\u043d\u0438\u0447\u043d\u043e\u0439 \u0441\u0442\u043e\u0440\u043e\u043d\u043e\u0439, \u0442\u0430\u043a \u0447\u0442\u043e\u0431\u044b \u043d\u0430\u0447\u0430\u043b\u043e \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442 \u043d\u0430\u0445\u043e\u0434\u0438\u043b\u043e\u0441\u044c \u0432 \u043b\u0435\u0432\u043e\u043c \u0443\u0433\u043b\u0443.<br \/>\u041d\u0430\u0440\u0438\u0441\u0443\u0435\u043c \u0435\u0434\u0438\u043d\u0438\u0447\u043d\u044b\u0439 \u043a\u0440\u0443\u0433 \u0441 \u0446\u0435\u043d\u0442\u0440\u043e\u043c \u0432 \u043d\u0430\u0447\u0430\u043b\u0435 \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/543\/c51\/c73\/543c51c7316fc674a7f0337103189177.png\" alt=\"\u0433\u0435\u043e\u043c\u0435\u0442\u0440\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u043c\u043e\u0434\u0435\u043b\u044c\" title=\"\u0433\u0435\u043e\u043c\u0435\u0442\u0440\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u043c\u043e\u0434\u0435\u043b\u044c\" width=\"2068\" height=\"1560\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/543\/c51\/c73\/543c51c7316fc674a7f0337103189177.png\"\/><figcaption>\u0433\u0435\u043e\u043c\u0435\u0442\u0440\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u043c\u043e\u0434\u0435\u043b\u044c<\/figcaption><\/figure>\n<p>\u0411\u0443\u0434\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u0440\u0430\u0441\u043f\u043e\u043b\u0430\u0433\u0430\u0442\u044c \u0442\u043e\u0447\u043a\u0443 \u0432 \u043a\u0432\u0430\u0434\u0440\u0430\u0442\u0435. <br \/>\u041d\u0430\u0448\u0430 \u0438\u0441\u0445\u043e\u0434\u043d\u0430\u044f \u0437\u0430\u0434\u0430\u0447\u0430 \u0441\u0432\u043e\u0434\u0438\u0442\u0441\u044f \u043a \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u043c\u0443 \u0432\u043e\u043f\u0440\u043e\u0441\u0443. <br \/><strong>\u041a\u0430\u043a\u0430\u044f \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u044c, \u0447\u0442\u043e \u0442\u043e\u0447\u043a\u0430 \u043f\u043e\u043f\u0430\u0434\u0435\u0442 \u0432 \u0432\u0435\u0440\u0445\u043d\u044e\u044e \u043f\u0440\u0430\u0432\u0443\u044e \u0447\u0435\u0442\u0432\u0435\u0440\u0442\u044c \u043a\u0440\u0443\u0433\u0430 (\u043e\u0431\u043b\u0430\u0441\u0442\u044c A)<\/strong><\/p>\n<p>\u041c\u044b \u0437\u043d\u0430\u0435\u043c, \u0447\u0442\u043e <img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"S_{\u043a\u0432\u0430\u0434\u0440\u0430\u0442\u0430} = 1\" alt=\"S_{\u043a\u0432\u0430\u0434\u0440\u0430\u0442\u0430} = 1\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/fe3\/e80\/351\/fe3e80351ea21342faea21b6ba4f6bac.svg\" width=\"92\" height=\"27\"\/>, \u0430 <img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"S_{A} =\\frac{\\pi r^2}{4}=(r=1)=\\frac{\\pi}{4}\" alt=\"S_{A} =\\frac{\\pi r^2}{4}=(r=1)=\\frac{\\pi}{4}\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/4de\/522\/5ca\/4de5225cadf413d1282424e271bce20a.svg\" width=\"217\" height=\"46\"\/><\/p>\n<p>\u0417\u043d\u0430\u0447\u0438\u0442 \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u044c \u0442\u043e\u0433\u043e, \u0447\u0442\u043e \u0442\u043e\u0447\u043a\u0430 \u043f\u043e\u043f\u0430\u0434\u0435\u0442 \u0432 \u0438\u0441\u043a\u043e\u043c\u0443\u044e \u043e\u0431\u043b\u0430\u0441\u0442\u044c \u0440\u0430\u0432\u043d\u0430 <img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"P(A)=\\frac{\\pi}{4}\" alt=\"P(A)=\\frac{\\pi}{4}\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/f93\/3fe\/1be\/f933fe1beb01b37414fbac162e39bbb1.svg\" width=\"89\" height=\"38\"\/><\/p>\n<p>\u0421 \u0434\u0440\u0443\u0433\u043e\u0439 \u0441\u0442\u043e\u0440\u043e\u043d\u044b, \u043f\u043e\u0441\u043b\u0435 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f n \u0442\u043e\u0447\u0435\u043a \u043f\u043e \u043a\u0432\u0430\u0434\u0440\u0430\u0442\u0443, \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u043e\u0446\u0435\u043d\u0438\u0442\u044c \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0442\u043e\u0447\u0435\u043a, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043f\u043e\u043f\u0430\u043b\u043e \u0432\u043d\u0443\u0442\u0440\u044c \u043a\u0440\u0443\u0433\u0430. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0442\u043e\u0447\u043a\u0430 \u0441 \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u0430\u043c\u0438 <img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"(x,y)\" alt=\"(x,y)\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/a7d\/58a\/e56\/a7d58ae567fbf1b502b67eb9ca713911.svg\" width=\"45\" height=\"22\"\/><\/p>\n<p>\u0434\u043e\u043b\u0436\u043d\u0430 \u0443\u0434\u043e\u0432\u043b\u0435\u0442\u0432\u043e\u0440\u044f\u0442\u044c \u043d\u0435\u0440\u0430\u0432\u0435\u043d\u0441\u0442\u0432\u0443 <img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"\\sqrt{x^2+y^2}\\leq1\" alt=\"\\sqrt{x^2+y^2}\\leq1\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/f9e\/32d\/9f7\/f9e32d9f7071ef21183dca7e95b4d835.svg\" width=\"118\" height=\"39\"\/><\/p>\n<p>\u0422\u043e\u0433\u0434\u0430 \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u044c <img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"P(A)=\\frac{m}{n}\" alt=\"P(A)=\\frac{m}{n}\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/e17\/1c3\/2e2\/e171c32e2fd6788fed0102d1c6116968.svg\" width=\"95\" height=\"38\"\/>, \u0433\u0434\u0435 <img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"m\" alt=\"m\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/4ea\/261\/234\/4ea2612343db471fd52e17c3c2211559.svg\" width=\"17\" height=\"12\"\/>\u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0442\u043e\u0447\u0435\u043a \u043f\u043e\u043f\u0430\u0432\u0448\u0438\u0445 \u0432\u043d\u0443\u0442\u0440\u044c \u043a\u0440\u0443\u0433\u0430, \u0430 n \u043e\u0431\u0449\u0435\u0435 \u0447\u0438\u0441\u043b\u043e \u0442\u043e\u0447\u0435\u043a.<\/p>\n<p>\u0417\u043d\u0430\u0447\u0438\u0442 \u0438\u0437 \u0432\u0435\u0440\u043d\u0438\u0445 \u0441\u043e\u043e\u0442\u043d\u043e\u0448\u0435\u043d\u0438\u0439 \u0438\u043c\u0435\u0435\u043c <img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"P(A)=\\frac{\\pi}{4}=\\frac{m}{n} \\Rightarrow \\pi=4*\\frac{m}{n}\" alt=\"P(A)=\\frac{\\pi}{4}=\\frac{m}{n} \\Rightarrow \\pi=4*\\frac{m}{n}\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/812\/7fc\/215\/8127fc2158c257541528230dafcbe004.svg\" width=\"260\" height=\"38\"\/><\/p>\n<p><strong>\u041f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u0443\u0435\u043c<\/strong><\/p>\n<pre><code class=\"python\">import random  def estimate_pi(n):     num_point_circle = 0 #\u043a\u043e\u043b-\u0432\u043e \u0442\u043e\u0447\u0435\u043a \u0432\u043d\u0443\u0442\u0440\u0438 \u043a\u0440\u0443\u0433\u0430     num_point_total = n      for i in range(n):         x = random.uniform(0,1)         y = random.uniform(0,1)         distance = x**2 + y**2          if distance &lt;= 1: #\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u043c, \u0447\u0442\u043e \u0442\u043e\u0447\u043a\u0430 \u043f\u043e\u043f\u0430\u043b\u0430 \u0432\u043d\u0443\u0442\u0440\u044c \u043a\u0440\u0443\u0433\u0430             num_point_circle += 1      return 4 * num_point_circle\/num_point_total  n = 10000000 #\u043e\u0431\u0449\u0435\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0442\u043e\u0447\u0435\u043a (\u0447\u0435\u043c \u0431\u043e\u043b\u044c\u0448\u0435 \u0442\u043e\u0447\u0435\u043a, \u0442\u0435\u043c \u043b\u0443\u0447\u0448\u0435 \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u044c) pi =  estimate_pi(n)  print(pi)<\/code><\/pre>\n<h2>\u041d\u0430 \u044d\u0442\u043e\u043c \u0432\u0441\u0435!<\/h2>\n<p>\u041d\u0430\u0434\u0435\u044e\u0441\u044c \u0432\u0430\u043c \u043f\u043e\u043d\u0440\u0430\u0432\u0438\u043b\u0430\u0441\u044c \u0437\u0430\u0434\u0430\u0447\u0430! \u0414\u0435\u043b\u0438\u0442\u0435\u0441\u044c \u0441\u0432\u043e\u0438\u043c\u0438 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u043c\u0438 \u0437\u0430\u0434\u0430\u0447\u043a\u0430\u043c\u0438 \u0441 \u0441\u043e\u0431\u0435\u0441\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u0439, \u0431\u0443\u0434\u0435\u043c \u0440\u0430\u0437\u0431\u0438\u0440\u0430\u0442\u044c)<\/p>\n<p>\u0421\u0432\u044f\u0437\u0430\u0442\u044c\u0441\u044f \u0441\u043e \u043c\u043d\u043e\u0439\u00a0<a href=\"https:\/\/t.me\/polozovs\" rel=\"noopener noreferrer nofollow\">@polozovs<\/a><\/p>\n<\/p>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"v-portal\" style=\"display:none;\"><\/div>\n<\/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\/post\/696244\/\"> https:\/\/habr.com\/ru\/post\/696244\/<\/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<blockquote>\n<p><strong>\u041f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u044c\u0442\u0435, \u0447\u0442\u043e \u0443 \u0432\u0430\u0441 \u0435\u0441\u0442\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u044f random(), \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u044e\u0442 \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0432 \u043f\u0440\u043e\u043c\u0435\u0436\u0443\u0442\u043a\u0435 <\/strong><\/p>\n<p><strong>\u0412\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0447\u0438\u0441\u043b\u0430 <\/strong><\/p>\n<\/blockquote>\n<p>\u042d\u0442\u043e \u043e\u0434\u0438\u043d \u0438\u0437 \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u044b\u0445 \u0432\u043e\u043f\u0440\u043e\u0441\u043e\u0432 \u043d\u0430 \u0441\u043e\u0431\u0435\u0441\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u0438 \u0432 \u0442\u043e\u043f\u043e\u0432\u0443\u044e  IT \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u044e<\/p>\n<p>\u0412 \u043f\u0435\u0440\u0432\u0443\u044e \u0441\u0435\u043a\u0443\u043d\u0434\u0443 \u043c\u043e\u0436\u0435\u0442 \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u044c\u0441\u044f, \u0447\u0442\u043e \u0432\u0430\u0448 \u0438\u043d\u0442\u0435\u0440\u0432\u044c\u044e\u0435\u0440 \u0441\u043b\u0435\u0433\u043a\u0430 \u0438\u0437\u0434\u0435\u0432\u0430\u0435\u0442\u0441\u044f \u043d\u0430\u0434 \u0432\u0430\u043c, \u043d\u043e \u0435\u0441\u043b\u0438 \u0432\u0441\u043f\u043e\u043c\u043d\u0438\u0442\u044c \u043e\u0441\u043d\u043e\u0432\u044b \u0438\u0437 \u0442\u0435\u043e\u0440\u0438\u0438 \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u0438, \u0442\u043e \u0432\u0441\u0435 \u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0441\u044f \u0433\u043e\u0440\u0430\u0437\u0434\u043e \u043f\u0440\u043e\u0449\u0435. Let&#8217;s go!<\/p>\n<h2>\u0411\u0430\u0437\u0430 \u0438\u0437 \u0442\u0435\u043e\u0440\u0438\u0438 \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u0438 <\/h2>\n<p><strong>\u041a\u043b\u0430\u0441\u0441\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u0438.<\/strong><\/p>\n<p>\u0412\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u044c, \u0447\u0442\u043e \u0441\u043e\u0431\u044b\u0442\u0438\u0435 A \u043f\u0440\u043e\u0438\u0437\u043e\u0439\u0434\u0435\u0442, \u0440\u0430\u0432\u043d\u043e \u043e\u0442\u043d\u043e\u0448\u0435\u043d\u0438\u044e \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0443 \u0431\u043b\u0430\u0433\u043e\u043f\u0440\u0438\u044f\u0442\u043d\u044b\u0445 \u0438\u0441\u0445\u043e\u0434\u043e\u0432 \u043a \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0443 \u0432\u0441\u0435\u0445 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0445 \u0438\u0441\u0445\u043e\u0434\u043e\u0432 <\/p>\n<p>\u041d\u0430 \u044f\u0437\u044b\u043a\u0435 \u043c\u0430\u0442\u0435\u043c\u0430\u0442\u0438\u043a\u0438 \u044d\u0442\u043e \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0442\u0430\u043a: <\/p>\n<p>\u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u0443 \u043d\u0430\u0441 \u0435\u0441\u0442\u044c \u043a\u0443\u0431\u0438\u043a. \u041a\u0430\u043a\u0430\u044f \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u044c \u0447\u0442\u043e \u0432\u044b\u043f\u0430\u0434\u0435\u0442 \u0433\u0440\u0430\u043d\u044c \u0441 \u0447\u0435\u0442\u043d\u044b\u043c\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f\u043c\u0438?<\/p>\n<details class=\"spoiler\">\n<summary>\u0420\u0435\u0448\u0435\u043d\u0438\u0435<\/summary>\n<div class=\"spoiler__content\">\n<p>\u041d\u0430\u0431\u043e\u0440 \u0432\u0441\u0435\u0445 \u0438\u0441\u0445\u043e\u0434\u043e\u0432 {} <br \/>\u041d\u0430\u0431\u043e\u0440 \u0431\u043b\u0430\u0433\u043e\u043f\u0440\u0438\u044f\u0442\u043d\u044b\u0445 \u0438\u0441\u0445\u043e\u0434\u043e\u0432   {} <br \/>\u0417\u043d\u0430\u0447\u0438\u0442 <\/p>\n<\/div>\n<\/details>\n<p><strong>\u0413\u0435\u043e\u043c\u0435\u0442\u0440\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u0438.<\/strong><\/p>\n<p>\u041f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0435 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u0438 \u043e\u0442\u043b\u0438\u0447\u043d\u043e\u0435, \u043d\u043e \u043e\u043d\u043e \u043e\u0431\u043b\u0430\u0434\u0430\u0435\u0442 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u043c\u0438 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u043c\u0438 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u044f\u043c\u0438. \u041e\u0434\u043d\u0438\u043c \u0438\u0437 \u0442\u0430\u043a\u0438\u0445 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u0439 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0442\u043e\u0442 \u0444\u0430\u043a\u0442, \u0447\u0442\u043e \u043e\u043d\u043e \u043d\u0435\u043f\u0440\u0438\u043c\u0435\u043d\u0438\u043c\u043e \u043a \u0438\u0441\u043f\u044b\u0442\u0430\u043d\u0438\u044f\u043c \u0441 \u0431\u0435\u0441\u043a\u043e\u043d\u0435\u0447\u043d\u044b\u043c \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e\u043c \u0438\u0441\u0445\u043e\u0434\u043e\u0432.\u00a0<\/p>\n<p>\u0427\u0442\u043e\u0431\u044b \u0441\u0442\u0430\u043b\u043e \u043f\u043e\u043d\u044f\u0442\u043d\u043e \u043e \u0447\u0435\u043c \u0440\u0435\u0447\u044c &#8212; \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u0440\u0435\u0448\u0438\u043c \u0437\u0430\u0434\u0430\u0447\u043a\u0443.<\/p>\n<p>\u041d\u0430 \u043e\u0442\u0440\u0435\u0437\u043e\u043a \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u0431\u0440\u043e\u0448\u0435\u043d\u0430 \u0442\u043e\u0447\u043a\u0430 \u041d\u0430\u0439\u0434\u0438\u0442\u0435 \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u044c \u0442\u043e\u0433\u043e, \u0447\u0442\u043e \u043e\u043d\u0430 \u043f\u043e\u043f\u0430\u0434\u0435\u0442 \u0432 \u043f\u0440\u043e\u043c\u0435\u0436\u0443\u0442\u043e\u043a <\/p>\n<p>\u041f\u043e\u043d\u044f\u0442\u043d\u043e, \u0447\u0442\u043e \u0437\u0434\u0435\u0441\u044c \u043d\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u0441\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043a\u043b\u0430\u0441\u0441\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u043d\u0430 \u043e\u0442\u0440\u0435\u0437\u043a\u0435 \u0431\u0435\u0441\u043a\u043e\u043d\u0435\u0447\u043d\u043e \u043c\u043d\u043e\u0433\u043e \u0442\u043e\u0447\u0435\u043a. \u0422\u043e\u0433\u0434\u0430 \u043d\u0430\u043c \u0438\u0434\u0435\u0442 \u043d\u0430 \u043f\u043e\u043c\u043e\u0449\u044c \u0433\u0435\u043e\u043c\u0435\u0442\u0440\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 <\/p>\n<p>\u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u0438 , \u0432 \u043d\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 , <\/p>\n<p>\u0421\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e <\/p>\n<h2>\u0420\u0435\u0448\u0435\u043d\u0438\u0435 \u0437\u0430\u0434\u0430\u0447\u0438 <\/h2>\n<p><strong>\u041a\u043e\u043d\u0446\u0435\u043f\u0446\u0438\u044f<\/strong><\/p>\n<p>\u041f\u043e\u0441\u0442\u0440\u043e\u0438\u043c \u0433\u0435\u043e\u043c\u0435\u0442\u0440\u0438\u0447\u0435\u0441\u043a\u0443\u044e \u043c\u043e\u0434\u0435\u043b\u044c.<\/p>\n<p>\u0412\u0432\u0435\u0434\u0435\u043c \u0441\u0438\u0441\u0442\u0435\u043c\u0443 \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442 \u0441 \u043e\u0441\u044f\u043c\u0438 \u0438 <br \/>\u0420\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0438\u043c \u043a\u0432\u0430\u0434\u0440\u0430\u0442 \u0441 \u0435\u0434\u0438\u043d\u0438\u0447\u043d\u043e\u0439 \u0441\u0442\u043e\u0440\u043e\u043d\u043e\u0439, \u0442\u0430\u043a \u0447\u0442\u043e\u0431\u044b \u043d\u0430\u0447\u0430\u043b\u043e \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442 \u043d\u0430\u0445\u043e\u0434\u0438\u043b\u043e\u0441\u044c \u0432 \u043b\u0435\u0432\u043e\u043c \u0443\u0433\u043b\u0443.<br \/>\u041d\u0430\u0440\u0438\u0441\u0443\u0435\u043c \u0435\u0434\u0438\u043d\u0438\u0447\u043d\u044b\u0439 \u043a\u0440\u0443\u0433 \u0441 \u0446\u0435\u043d\u0442\u0440\u043e\u043c \u0432 \u043d\u0430\u0447\u0430\u043b\u0435 \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442.<\/p>\n<figure class=\"full-width\"><figcaption>\u0433\u0435\u043e\u043c\u0435\u0442\u0440\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u043c\u043e\u0434\u0435\u043b\u044c<\/figcaption><\/figure>\n<p>\u0411\u0443\u0434\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u0440\u0430\u0441\u043f\u043e\u043b\u0430\u0433\u0430\u0442\u044c \u0442\u043e\u0447\u043a\u0443 \u0432 \u043a\u0432\u0430\u0434\u0440\u0430\u0442\u0435. <br \/>\u041d\u0430\u0448\u0430 \u0438\u0441\u0445\u043e\u0434\u043d\u0430\u044f \u0437\u0430\u0434\u0430\u0447\u0430 \u0441\u0432\u043e\u0434\u0438\u0442\u0441\u044f \u043a \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u043c\u0443 \u0432\u043e\u043f\u0440\u043e\u0441\u0443. <br \/><strong>\u041a\u0430\u043a\u0430\u044f \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u044c, \u0447\u0442\u043e \u0442\u043e\u0447\u043a\u0430 \u043f\u043e\u043f\u0430\u0434\u0435\u0442 \u0432 \u0432\u0435\u0440\u0445\u043d\u044e\u044e \u043f\u0440\u0430\u0432\u0443\u044e \u0447\u0435\u0442\u0432\u0435\u0440\u0442\u044c \u043a\u0440\u0443\u0433\u0430 (\u043e\u0431\u043b\u0430\u0441\u0442\u044c A)<\/strong><\/p>\n<p>\u041c\u044b \u0437\u043d\u0430\u0435\u043c, \u0447\u0442\u043e , \u0430 <\/p>\n<p>\u0417\u043d\u0430\u0447\u0438\u0442 \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u044c \u0442\u043e\u0433\u043e, \u0447\u0442\u043e \u0442\u043e\u0447\u043a\u0430 \u043f\u043e\u043f\u0430\u0434\u0435\u0442 \u0432 \u0438\u0441\u043a\u043e\u043c\u0443\u044e \u043e\u0431\u043b\u0430\u0441\u0442\u044c \u0440\u0430\u0432\u043d\u0430 <\/p>\n<p>\u0421 \u0434\u0440\u0443\u0433\u043e\u0439 \u0441\u0442\u043e\u0440\u043e\u043d\u044b, \u043f\u043e\u0441\u043b\u0435 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f n \u0442\u043e\u0447\u0435\u043a \u043f\u043e \u043a\u0432\u0430\u0434\u0440\u0430\u0442\u0443, \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u043e\u0446\u0435\u043d\u0438\u0442\u044c \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0442\u043e\u0447\u0435\u043a, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043f\u043e\u043f\u0430\u043b\u043e \u0432\u043d\u0443\u0442\u0440\u044c \u043a\u0440\u0443\u0433\u0430. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0442\u043e\u0447\u043a\u0430 \u0441 \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u0430\u043c\u0438 <\/p>\n<p>\u0434\u043e\u043b\u0436\u043d\u0430 \u0443\u0434\u043e\u0432\u043b\u0435\u0442\u0432\u043e\u0440\u044f\u0442\u044c \u043d\u0435\u0440\u0430\u0432\u0435\u043d\u0441\u0442\u0432\u0443 <\/p>\n<p>\u0422\u043e\u0433\u0434\u0430 \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u044c , \u0433\u0434\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0442\u043e\u0447\u0435\u043a \u043f\u043e\u043f\u0430\u0432\u0448\u0438\u0445 \u0432\u043d\u0443\u0442\u0440\u044c \u043a\u0440\u0443\u0433\u0430, \u0430 n \u043e\u0431\u0449\u0435\u0435 \u0447\u0438\u0441\u043b\u043e \u0442\u043e\u0447\u0435\u043a.<\/p>\n<p>\u0417\u043d\u0430\u0447\u0438\u0442 \u0438\u0437 \u0432\u0435\u0440\u043d\u0438\u0445 \u0441\u043e\u043e\u0442\u043d\u043e\u0448\u0435\u043d\u0438\u0439 \u0438\u043c\u0435\u0435\u043c <\/p>\n<p><strong>\u041f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u0443\u0435\u043c<\/strong><\/p>\n<pre><code class=\"python\">import random  def estimate_pi(n):     num_point_circle = 0 #\u043a\u043e\u043b-\u0432\u043e \u0442\u043e\u0447\u0435\u043a \u0432\u043d\u0443\u0442\u0440\u0438 \u043a\u0440\u0443\u0433\u0430     num_point_total = n      for i in range(n):         x = random.uniform(0,1)         y = random.uniform(0,1)         distance = x**2 + y**2          if distance &lt;= 1: #\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u043c, \u0447\u0442\u043e \u0442\u043e\u0447\u043a\u0430 \u043f\u043e\u043f\u0430\u043b\u0430 \u0432\u043d\u0443\u0442\u0440\u044c \u043a\u0440\u0443\u0433\u0430             num_point_circle += 1      return 4 * num_point_circle\/num_point_total  n = 10000000 #\u043e\u0431\u0449\u0435\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0442\u043e\u0447\u0435\u043a (\u0447\u0435\u043c \u0431\u043e\u043b\u044c\u0448\u0435 \u0442\u043e\u0447\u0435\u043a, \u0442\u0435\u043c \u043b\u0443\u0447\u0448\u0435 \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u044c) pi =  estimate_pi(n)  print(pi)<\/code><\/pre>\n<h2>\u041d\u0430 \u044d\u0442\u043e\u043c \u0432\u0441\u0435!<\/h2>\n<p>\u041d\u0430\u0434\u0435\u044e\u0441\u044c \u0432\u0430\u043c \u043f\u043e\u043d\u0440\u0430\u0432\u0438\u043b\u0430\u0441\u044c \u0437\u0430\u0434\u0430\u0447\u0430! \u0414\u0435\u043b\u0438\u0442\u0435\u0441\u044c \u0441\u0432\u043e\u0438\u043c\u0438 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u043c\u0438 \u0437\u0430\u0434\u0430\u0447\u043a\u0430\u043c\u0438 \u0441 \u0441\u043e\u0431\u0435\u0441\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u0439, \u0431\u0443\u0434\u0435\u043c \u0440\u0430\u0437\u0431\u0438\u0440\u0430\u0442\u044c)<\/p>\n<p>\u0421\u0432\u044f\u0437\u0430\u0442\u044c\u0441\u044f \u0441\u043e \u043c\u043d\u043e\u0439\u00a0<a href=\"https:\/\/t.me\/polozovs\" rel=\"noopener noreferrer nofollow\">@polozovs<\/a><\/p>\n<\/p>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"v-portal\" style=\"display:none;\"><\/div>\n<\/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\/post\/696244\/\"> https:\/\/habr.com\/ru\/post\/696244\/<\/a><br \/><\/br><\/br><\/p>\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-340439","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/340439","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=340439"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/340439\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=340439"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=340439"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=340439"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}