{"id":63,"date":"2022-04-04T21:13:10","date_gmt":"2022-04-04T13:13:10","guid":{"rendered":"https:\/\/reverieland.cn\/?p=63"},"modified":"2022-04-04T21:17:58","modified_gmt":"2022-04-04T13:17:58","slug":"%e6%9c%89%e9%99%90%e5%9f%9f%e4%b8%8a%e7%9a%84%e6%a4%ad%e5%9c%86%e6%9b%b2%e7%ba%bf%e7%be%a4%e7%9a%84%e7%82%b9%e4%b9%98%e8%bf%90%e7%ae%97%e5%ae%9e%e7%8e%b0","status":"publish","type":"post","link":"https:\/\/reverieland.cn\/index.php\/63\/","title":{"rendered":"\u6709\u9650\u57df\u4e0a\u7684\u692d\u5706\u66f2\u7ebf\u7fa4\u7684\u70b9\u4e58\u8fd0\u7b97\u5b9e\u73b0"},"content":{"rendered":"\n<p>\u4ee5<strong>y\u00b2=x\u00b3+x+7 p=17 Q(1,3)<\/strong>\u4e3a\u4f8b\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>public class test {\n\n\tprivate int X, Y;\n\n\tprivate int p = 17, k, a = 1, b = 7, x1 = 1, y1 = 3, modV;\n\n\tpublic int mod(int f) {\n\t\tint z = f \/ 17;\n\t\tint mo = f - (z * 17);\n\t\tif (mo &gt;= 0)\n\t\t\treturn mo;\n\t\telse\n\t\t\treturn mo + p;\n\t}\n\n\tpublic int extendedEuclid(int e, int modValue) {\n\t\tint i;\n\t\tint over = e;\n\t\tfor (i = 1; i &lt; modValue;) {\n\t\t\tover = over % modValue;\n\t\t\tif (over == 1) {\n\t\t\t\treturn i;\n\t\t\t} else {\n\t\t\t\tif (over + e &lt;= modValue) {\n\t\t\t\t\tdo {\n\t\t\t\t\t\ti++;\n\t\t\t\t\t\tover += e;\n\t\t\t\t\t} while (over + e &lt;= modValue);\n\t\t\t\t} else {\n\t\t\t\t\ti++;\n\t\t\t\t\tover += e;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn 0;\n\t}\n\n\tpublic void dp(int x, int y, int times) {\n\t\tif (times &gt;= 2) {\n\t\t\t\/\/System.out.println(\"111\");\n\t\t\tmodV = extendedEuclid(2 * y, p);\n\t\t\t\/\/System.out.println(modV);\n\t\t\tk = mod(((3 * x * x + a) * modV));\n\t\t\tX = mod(((k * k) - 2 * x));\n\t\t\tY = mod((-y + k * (x - X)));\n\t\t\tx = X;\n\t\t\ty = Y;\n\t\t}\n\t\tfor (int d = times - 2; d != 0; d--) {\n\t\t\tint m, n;\n\t\t\tmodV = extendedEuclid(X - x1, p);\n\t\t\t\/\/System.out.println(modV);\n\t\t\tk = mod((Y - y1) * modV);\n\t\t\tm = mod((k * k) - x1 - X);\n\t\t\tn = mod(((-y1) + (k * (x1 - m))));\n\t\t\tX = m;\n\t\t\tY = n;\n\t\t}\n\t\tSystem.out.println(X + \",\" + Y);\n\t\t\/\/System.out.println(k);\n\n\t}\n\n\tpublic static void main(String args&#91;]) {\n\t\ttest e1 = new test();\n\t\te1.dp(1, 3, 2);\n\t}\n}\n<\/code><\/pre>\n\n\n\n<p class=\"has-text-align-center\">\u2014\u2014END\u2014\u2014<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u7a0b\u5e8f\u4ee3\u7801<\/p>\n","protected":false},"author":1,"featured_media":64,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_import_markdown_pro_load_document_selector":0,"_import_markdown_pro_submit_text_textarea":"","emotion":"","emotion_color":"","title_style":"","license":"","footnotes":""},"categories":[13],"tags":[14],"class_list":["post-63","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-cybersecurity","tag-14"],"_links":{"self":[{"href":"https:\/\/reverieland.cn\/index.php\/wp-json\/wp\/v2\/posts\/63","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/reverieland.cn\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/reverieland.cn\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/reverieland.cn\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/reverieland.cn\/index.php\/wp-json\/wp\/v2\/comments?post=63"}],"version-history":[{"count":2,"href":"https:\/\/reverieland.cn\/index.php\/wp-json\/wp\/v2\/posts\/63\/revisions"}],"predecessor-version":[{"id":67,"href":"https:\/\/reverieland.cn\/index.php\/wp-json\/wp\/v2\/posts\/63\/revisions\/67"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/reverieland.cn\/index.php\/wp-json\/wp\/v2\/media\/64"}],"wp:attachment":[{"href":"https:\/\/reverieland.cn\/index.php\/wp-json\/wp\/v2\/media?parent=63"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/reverieland.cn\/index.php\/wp-json\/wp\/v2\/categories?post=63"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/reverieland.cn\/index.php\/wp-json\/wp\/v2\/tags?post=63"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}