找回密码
 欢迎注册
楼主: KeyTo9_Fans

[擂台] 把二进制数看成十进制数后再转成二进制

[复制链接]
发表于 4 天前 | 显示全部楼层
保留256位精度,前100项上下界一致
  1. LB                UB                eq
  2. 0xa        0        0xa        0        TRUE
  3. 0x3f2        0        0x3f2        0        TRUE
  4. 0x423a317a        0        0x423a317a        0        TRUE
  5. 0xc9f34e2a18a446da3dc4084e2        0        0xc9f34e2a18a446da3dc4084e2        0        TRUE
  6. 0x80c2004aa63df9f0eebaf444c61abf2f2aa15b355acf81fcbac5884877016ea0        74        0x80c2004aa63df9f0eebaf444c61abf2f2aa15b355acf81fcbac5884877016ea1        74        TRUE
  7. 0xf13e34d740b5e78ac0110301f0161860ea6c4a25f04f2a59635b97704666168a        837        0xf13e34d740b5e78ac0110301f0161860ea6c4a25f04f2a59635b977046661690        837        TRUE
  8. 0xcf8da9d142962250ad42f4027bccd235a60b58a0026fd8393aa600ba3c249d4a        3372        0xcf8da9d142962250ad42f4027bccd235a60b58a0026fd8393aa600ba3c249d60        3372        TRUE
  9. 0xda673050f0f5398fa5207683b93c8bbdd2c460aa9e051f9a3aac7325275bafe3        11793        0xda673050f0f5398fa5207683b93c8bbdd2c460aa9e051f9a3aac7325275bb03b        11793        TRUE
  10. 0xd41ad97ff0339ace4260f400c7996f456dcfe6de5e0306172ebabbd79fbcf55c        39767        0xd41ad97ff0339ace4260f400c7996f456dcfe6de5e0306172ebabbd79fbcf684        39767        TRUE
  11. 0xa2957ea307b07f659ce467231c0632dbb259ef99621f2539ec3b01107ce3325f        132695        0xa2957ea307b07f659ce467231c0632dbb259ef99621f2539ec3b01107ce3355a        132695        TRUE
  12. 0xa3a95e50ee04f5d3ae23ff69c5f151255404a87267958271ab922eabc5eed823        441395        0xa3a95e50ee04f5d3ae23ff69c5f151255404a87267958271ab922eabc5eee21c        441395        TRUE
  13. 0xbc60018bb6e532b242b07772b0445300a465132946a43323c64cc8d99df6529d        1466874        0xbc60018bb6e532b242b07772b0445300a465132946a43323c64cc8d99df678bf        1466874        TRUE
  14. 0x856c4c10d5543d6ed068dc4b849d3b6a69241b72344874f927f53753ee6bff2f        4873442        0x856c4c10d5543d6ed068dc4b849d3b6a69241b72344874f927f53753ee6c58e9        4873442        TRUE
  15. 0xfe4811e92d69bfdc54f39a681ed6211516e954f1d141f95966455c9fffa35e88        16189815        0xfe4811e92d69bfdc54f39a681ed6211516e954f1d141f95966455c9fffa59696        16189815        TRUE
  16. 0xba856ee9483ddd1dc419f19ccfa57fd62499086bbb31d7e518c5accf6f3c68d9        53781993        0xba856ee9483ddd1dc419f19ccfa57fd62499086bbb31d7e518c5accf6f41d119        53781993        TRUE
  17. 0xc951357617609a986c8217970e665639dfa9bf9fa0e228f9f88bce22f291a6f2        178660505        0xc951357617609a986c8217970e665639dfa9bf9fa0e228f9f88bce22f2a50a1b        178660505        TRUE
  18. 0x96b3ef3f548dbf6c8c91747270844bf7fbfd0cd03b9d7a8f8d388d1aeaffd617        593497943        0x96b3ef3f548dbf6c8c91747270844bf7fbfd0cd03b9d7a8f8d388d1aeb300c33        593497943        TRUE
  19. 0x934e8bb61cb228a77801c40775e5585d69b64ab42ade7b1fce8dcedaeea74d5a        1971558083        0x934e8bb61cb228a77801c40775e5585d69b64ab42ade7b1fce8dcedaef43d90b        1971558083        TRUE
  20. 0xd1d482b255a90bae87abcdba282d4e59d082c9a5d0e7becf433161d7c5bfcd11        6549374778        0xd1d482b255a90bae87abcdba282d4e59d082c9a5d0e7becf433161d7c8a48f13        6549374778        TRUE
  21. 0x949b73995f9061279f9c0a461b568ba47461e646f9f0c70f3570d8f1c3adccb1        21756552671        0x949b73995f9061279f9c0a461b568ba47461e646f9f0c70f3570d8f1ca7c904f        21756552671        TRUE
  22. 0xdc82c2082a7583d43a05380f8c66cbe9f92a50eaee809db7980cc07d26c5a399        72273704157        0xdc82c2082a7583d43a05380f8c66cbe9f92a50eaee809db7980cc07d485424f6        72273704157        TRUE
  23. 0xf6ad0c6f6844379953497cfe22d92c3f8b756a5bbef568f79e862e79712472b1        240088048952        0xf6ad0c6f6844379953497cfe22d92c3f8b756a5bbef568f79e862e79edd79d88        240088048952        TRUE
  24. 0xbff6b423ce0aa8d1ff91e3565fcd932f3f93ececd1d7753b71f8d3bca92476fd        797555235652        0xbff6b423ce0aa8d1ff91e3565fcd932f3f93ececd1d7753b71f8d3bdeb820449        797555235652        TRUE
  25. 0xff8570f4fc1bf564026b5e0eccae13c5199e4f3da4379a2ea534fb846b62a5c0        2649421145128        0xff8570f4fc1bf564026b5e0eccae13c5199e4f3da4379a2ea534fb89fcd15cd1        2649421145128        TRUE
  26. 0xc14b8ad19430ec44eb819218db468d0e26bbb700dff100bcb06b10e6e2d49fc2        8801186537781        0xc14b8ad19430ec44eb819218db468d0e26bbb700dff100bcb06b10f4e0df5a31        8801186537781        TRUE
  27. 0xa514f2702d1779ae8bfe935137cf50b4f8e1fea0d5a7e2e9b54146bc180ff0fc        29236908828791        0xa514f2702d1779ae8bfe935137cf50b4f8e1fea0d5a7e2e9b54146e3ca889b4a        29236908828791        TRUE
  28. 0x9d43c34f8b6fc4b5b40651a3c67bb6cb9811a20ece71cde68a54f9b5960dbf76        97122908846613        0x9d43c34f8b6fc4b5b40651a3c67bb6cb9811a20ece71cde68a54fa333676342c        97122908846613        TRUE
  29. 0x8fb8d1a32dba9f2a26cd69d22f99a8fe5c5c766868ce8fd9d669335efa4e5c2e        322635319555340        0x8fb8d1a32dba9f2a26cd69d22f99a8fe5c5c766868ce8fd9d66934dc5ce0d2b1        322635319555340        TRUE
  30. 0x85748f94b11455ddda26d3f2880879bb611aa0463cc37f506d4c045e19afaa3f        1071771332434438        0x85748f94b11455ddda26d3f2880879bb611aa0463cc37f506d4c08f6882aea62        1071771332434438        TRUE
  31. 0xc51df9b70e8e4b430c6abb2297d5e82c319015f16d93e8c0e49d52a42b6553c3        3560347300509414        0xc51df9b70e8e4b430c6abb2297d5e82c319015f16d93e8c0e49d69306bf9848a        3560347300509414        TRUE
  32. 0x97e8ec5a4b3e07031c7fc0f6fc766eb3728f71dcfeb8e776a4622cbb46bb6821        11827217725119193        0x97e8ec5a4b3e07031c7fc0f6fc766eb3728f71dcfeb8e776a4626674a5eaee1b        11827217725119193        TRUE
  33. 0xb5ff0f82daa8ae2e06cb18dc79d9219fb2331d9ff0cab06c4deead6693aed1f5        39289166845423836        0xb5ff0f82daa8ae2e06cb18dc79d9219fb2331d9ff0cab06c4def932253d42082        39289166845423836        TRUE
  34. 0xc0cbe01489c7c9cc356834577928bd7e782af296578e2d341fe1e6574a6ea40a        130515787168531115        0xc0cbe01489c7c9cc356834577928bd7e782af296578e2d341fe50ec9486738e8        130515787168531115        TRUE
  35. 0x92b5c1630c57353f8d155f8e165d9e7b863c315866ba35dfb0222ec10adfeb2f        433564060221483611        0x92b5c1630c57353f8d155f8e165d9e7b863c315866ba35dfb02a2a618d280f7d        433564060221483611        TRUE
  36. 0x99cc765fd1bebeced7208e8840f81a6c34a00686b5a5228ac6c0047ab6a2dc1d        1440268632583183284        0x99cc765fd1bebeced7208e8840f81a6c34a00686b5a5228ac6dbd147b1dc4ed9        1440268632583183284        TRUE
  37. 0xb9b96e87bb49fb84982de8eb3feb9b259fcb5a4f7f26637bdad234d0e4d77c18        4784468834763081090        0xb9b96e87bb49fb84982de8eb3feb9b259fcb5a4f7f26637bdb41b9d6c95c4826        4784468834763081090        TRUE
  38. 0xb5d54a0331e155e507eb7f21d3bb720348c30d36f21390b94e2e3c77e3cfbd12        15893661441312480997        0xb5d54a0331e155e507eb7f21d3bb720348c30d36f21390b94f98ef49630b0619        15893661441312480997        TRUE
  39. 0xd035e8d264ed8c35d787f17c5c94613c3679d30c89d2b34984ed505e698f88db        52797600472523900181        0xd035e8d264ed8c35d787f17c5c94613c3679d30c89d2b3498a50f427ecfe0026        52797600472523900181        TRUE
  40. 0x8f67da2311c1905135e4f8d1351fefac89a3617c491cfc96d17644c0190e861e        175389832352315422407        0x8f67da2311c1905135e4f8d1351fefac89a3617c491cfc96ddcade318a10532e        175389832352315422407        TRUE
  41. 0x8a93d9dcc9c120a06eaa7abda5a709918d393c1d647f72e630f8df3703e7e4af        582632411648741041664        0x8a93d9dcc9c120a06eaa7abda5a709918d393c1d647f72e6588dd4589368b96b        582632411648741041664        TRUE
  42. 0xb8fa9803935617cc491e1dbd0a724c501e748e23c993ca09c9b2b4cc809a5d4d        1935462977247931791372        0xb8fa9803935617cc491e1dbd0a724c501e748e23c993ca0a7936b4a15bea5f1f        1935462977247931791372        TRUE
  43. 0x9e16890f12a6da285c311f7506fb357cf52c63d28f2bbe14b08a281628b5a29c        6429468840734244393453        0x9e16890f12a6da285c311f7506fb357cf52c63d28f2bbe16a2d497ce1eb7f62e        6429468840734244393453        TRUE
  44. 0xc27ef70af46a957f2f51b45520fbf76d6e6a94cde7bd3ce94824e0fb69ff29dc        21358233177237966605138        0xc27ef70af46a957f2f51b45520fbf76d6e6a94cde7bd3cf13ca52cf714abca85        21358233177237966605138        TRUE
  45. 0xc0bb72c2c93f1d522fde4ee0a6e77736c7f888f5c2c254f5250b92ac8da3e5b3        70950514848622174528149        0xc0bb72c2c93f1d522fde4ee0a6e77736c7f888f5c2c2550f54ced4f7876b484b        70950514848622174528149        TRUE
  46. 0xf239456c0ffc04a98785efb8850560489388e2ffdb646457d4b3c298dd2996ad        235692508622360974195702        0xf239456c0ffc04a98785efb8850560489388e2ffdb6464c528a8caa933de2fff        235692508622360974195702        TRUE
  47. 0xb680341eb6f8ba26d486422db881ff20efe5b36f503c42943e59b15b74ace68c        782953566147102814617087        0xb680341eb6f8ba26d486422db881ff20efe5b36f503c43a5e09302e7a09fdce2        782953566147102814617087        TRUE
  48. 0xe9761a2b7c02972a15f7bc8223abe2b1959f4c2f34da2dbad394060f8a5ded63        2600915448376311691313299        0xe9761a2b7c02972a15f7bc8223abe2b1959f4c2f34da3245a3c98dd219116560        2600915448376311691313299        TRUE
  49. 0xb22a0ef65cf9034ebfc9f3fb13b67a93dc7085bc84d66e43e2f003fbb80113ef        8640054100387830930358284        0xb22a0ef65cf9034ebfc9f3fb13b67a93dc7085bc84d679c7bd7961ecfd871415        8640054100387830930358284        TRUE
  50. 0xacc47c70ca26ce177076f7e42d59946bdee651efdac7afd7d526db4bd1342419        28701638457425090555526659        0xacc47c70ca26ce177076f7e42d59946bdee651efdac7d4efc3b9e80071851aee        28701638457425090555526659        TRUE
  51. 0x8d6e4047c2f99b57488804ece5eb97986b00c665a74ed9f0927a148b46a71e66        95344779161019984506204449        0x8d6e4047c2f99b57488804ece5eb97986b00c665a74f3ecfba35376a364c334e        95344779161019984506204449        TRUE
  52. 0xd042fa465bc801f50a818489b731cbe732b2dd96c1786906d0d701feb454ddc1        316728500595823403320105666        0xd042fa465bc801f50a818489b731cbe732b2dd96c17a5674ce3421a797405782        316728500595823403320105666        TRUE
  53. 0xcc2e4399fa30cda5ef94234f5bcfd0b6132205081831703069fa0ad238242647        1052149304580814448477908200        0xcc2e4399fa30cda5ef94234f5bcfd0b6132205081837b7353387872be62abc1d        1052149304580814448477908200        TRUE
  54. 0xe46d0e00e19521dd99ec87b48bdb039249dc873eb61f4edb6b4182bbba303a6f        3495164334903208087022834722        0xe46d0e00e19521dd99ec87b48bdb039249dc873eb636a3296a0ca3f53ae2ae5c        3495164334903208087022834722        TRUE
  55. 0xc5b7ead14c6827d3f4d9d1c33cea26de4f7acc2e4c176554b6188732559e327d        11610684600363268945421466250        0xc5b7ead14c6827d3f4d9d1c33cea26de4f7acc2e4c5a79d786ed23c026f38231        11610684600363268945421466250        TRUE
  56. 0x8dcf93a801df98393a34142bf0fdfacb66995882bc89bedf0bbaef88ecfbd98c        38569859374822790062833433780        0x8dcf93a801df98393a34142bf0fdfacb66995882bd29923a33579949b841e798        38569859374822790062833433780        TRUE
  57. 0x91da52bce79671cb03eff08058465b75964efd0d93a209eaf269ac668e923e3d        128126299473078543553061211214        0x91da52bce79671cb03eff08058465b75964efd0d95c419cd381a2253ff1ddf95        128126299473078543553061211214        TRUE
  58. 0x8c154553e0e6998a61240a0f8c2b3b89ff327e7b9f1893a7faea9e57de1e1e1e        425626353913571464421883265408        0x8c154553e0e6998a61240a0f8c2b3b89ff327e7ba5e6cc118c1fa0a5f531d531        425626353913571464421883265408        TRUE
  59. 0xd35a92b7421a2135f744830c8eb83a61814e3a6fc119905687d7128ceb7c46fd        1413900142989964696264005783674        0xd35a92b7421a2135f744830c8eb83a61814e3a6fe335a49c04ad546c2a0f77a4        1413900142989964696264005783674        TRUE
  60. 0xa2267bad71edcf80948b4f6c56854caf40c57e066625aabaed5d762545fb2fc6        4696874608363622635125333090483        0xa2267bad71edcf80948b4f6c56854caf40c57e06bd140e04bfbf1dc0f148c56e        4696874608363622635125333090483        TRUE
  61. 0xdeb2006de55d91793bad1f31f452132aaa495e43d851bb8ae053402b4be2930e        15602679719686195079367186445436        0xdeb2006de55d91793bad1f31f452132aaa495e4564ecd86aa464932a0c238777        15602679719686195079367186445436        TRUE
  62. 0x8f421edc7699077ce11cb21c545d74f34009b67500d4aa3c630e4c071f06f1e1        51830980116354846807243775876692        0x8f421edc7699077ce11cb21c545d74f34009b678505dd5d4a6c3c64401c65a7e        51830980116354846807243775876692        TRUE
  63. 0xee3ddac6d62800d10396daa31723bf4623ab52ca5493bd99bcd50c40b805919d        172178789034067414690517780784457        0xee3ddac6d62800d10396daa31723bf4623ab52dc9ebc81cf01b2365095edd4ef        172178789034067414690517780784457        TRUE
  64. 0x8622cb47d7fcedb251eaae3a485c883fd242c704881db6abb8ee9b65d8ab0f0b        571965556635952642441117800893317        0x8622cb47d7fcedb251eaae3a485c883fd242c726bd499673073c88c1c0f146ec        571965556635952642441117800893317        TRUE
  65. 0x81deb0d41973003531df280d16fa569e30a7bedfefe3f05c486b88e30a57122a        1900028451896859912616119061867986        0x81deb0d41973003531df280d16fa569e30a7bf4df563dee70da2ee2efe9a14c0        1900028451896859912616119061867986        TRUE
  66. 0xbded28f58b38eb8018141447de6c8857cd01eb8d3a68fd31dc48f0c2a1409f5e        6311757895441520242197476841126517        0xbded28f58b38eb8018141447de6c8857cd01eda3b96f7818a3db1d4c8c74b4a6        6311757895441520242197476841126517        TRUE
  67. 0xf43874eb7aa067a0d5809851b79166eb21a96c64bda2492e770e66b231b59d44        20967205880994316931913496148453322        0xf43874eb7aa067a0d5809851b79166eb21a9754fe04c74a498a37b8c18694f2e        20967205880994316931913496148453322        TRUE
  68. 0xe29f98d5c56a64fa32d32403a70750fe8a9aa5d19e6fafee899a641647057ea4        69651550287362551109302814460006636        0xe29f98d5c56a64fa32d32403a70750fe8a9ac14f8ac407232f2568ca4980b626        69651550287362551109302814460006636        TRUE
  69. 0xc39b769c80aa2e9e9e099e535df8a1dd77b565698be2b406bd984aaf3ab43ed0        231377441752049594889305539409373420        0xc39b769c80aa2e9e9e099e535df8a1dd77b5b43d421a83ce98a90fbb7e9d6053        231377441752049594889305539409373420        TRUE
  70. 0xc5dd2ebb05e36f50930b8a7f8291cb3e0011b7e66b21d22614ca4e27e0f9e189        768619224279297761301429695197554101        0xc5dd2ebb05e36f50930b8a7f8291cb3e0012c0c75b781c3b4a874b5a259362d2        768619224279297761301429695197554101        TRUE
  71. 0xcec82159952c4aa2ae69671c4c7a9a9554f9c3b9ff0cc32cb5db0482b974e6e9        2553297795403929895333266596592230930        0xcec82159952c4aa2ae69671c4c7a9a9554fd5b4ac2da19b4b47354d22f7daa78        2553297795403929895333266596592230930        TRUE
  72. 0x84a30eb635c7d566ca1cf97ecd14367a66a01c46aeb49c312e4484ce55523d64        8481871681166279123855799525570354923        0x84a30eb635c7d566ca1cf97ecd14367a66a7c3af78307294adf2bc4e10a23443        8481871681166279123855799525570354923        TRUE
  73. 0xd9a6f0f86934b25175043da01893f7c19e3cda093c8aa73ed4dfe686a0edac0c        28176167834895766876316768911980670715        0xd9a6f0f86934b25175043da01893f7c19e6693150107fae1a63cdac5645239fc        28176167834895766876316768911980670715        TRUE
  74. 0xdad7b9d181564c2b315b98f58f770c3457139d1fc34e3c4e6830e624b380a691        93599203537001871992072580403011500436        0xdad7b9d181564c2b315b98f58f770c34579ef8e07066fe032a20e92bb8292bb6        93599203537001871992072580403011500436        TRUE
  75. 0x9c467c65eb451aeee3b39cd34a8cbc84af7aa277231361e90e4acb9df6084e0c        310929823888647096110443538025101616720        0x9c467c65eb451aeee3b39cd34a8cbc84b0c537f7d903e0bbb74ecb380546892b        310929823888647096110443538025101616720        TRUE
  76. 0xe7796e5a0bc0b1191654a901d768868e9dd1f99f7b104762e47f1b74fae30bda        1032886517514076534769535336563643988955        0xe7796e5a0bc0b1191654a901d768868ea42c96c4c1db3291a46508a9e4b0723c        1032886517514076534769535336563643988955        TRUE
  77. 0x9109d915ef9475a72131ebac66e432aefd0edcabf79c9cc9480090fe478dffd9        3431174741360378486581976013937370470526        0x9109d915ef9475a72131ebac66e432af0a489cfc8409d8c2a6299a2d2dbeb3f8        3431174741360378486581976013937370470526        TRUE
  78. 0xe0ff186454e3121fc8cb1667573e81cd1f2b7b9efc7ff5645f8ac30cbfe9a627        11398115771792920347496749624773547264506        0xe0ff186454e3121fc8cb1667573e81cd63532a7ac93516dd09d9a559f63af66d        11398115771792920347496749624773547264506        TRUE
  79. 0x9d1316c4c86be6615890e89a95427189cad1fd87485fa83eed4c5ffc854d012b        37863721011097653625209578965518810993663        0x9d1316c4c86be6615890e89a9542718a68e0ff88a1d8ebe8f90e54a4d5e31b48        37863721011097653625209578965518810993663        TRUE
  80. 0x8428d6aebbe2f262cd680820aae8b136b14c6e51088050b4fc16993cbc283386        125780558603742221730579006039251371534492        0x8428d6aebbe2f262cd680820aae8b1386b12cd8f4fac03d636e77bf4504b2fa8        125780558603742221730579006039251371534492        TRUE
  81. 0x9b205c024f1481d863dbecaa2ba412cd3cf66540a55a972141a762156a917476        417833971416397631699844703911091523672181        0x9b205c024f1481d863dbecaa2ba412d3f789f870b497acc6e86c3ac88172c9bc        417833971416397631699844703911091523672181        TRUE
  82. 0xa562671d0029321662e642c33a04e1633d40c5002dabbad936011c7b334dabb6        1388014408646494398914813637734187755502275        0xa562671d0029321662e642c33a04e17b11ec3aa48cae75511b806b88d78ecbf8        1388014408646494398914813637734187755502275        TRUE
  83. 0xdc83d28f36bab783faad643dd4dfa83978ef00817a7138c5b76b088193d4de14        4610884060191257982903148807363210375587485        0xdc83d28f36bab783faad643dd4dfa8a3068b7aa7a19451c36a27ebef31e920bf        4610884060191257982903148807363210375587485        TRUE
  84. 0xade7e0a063539dd82c3face604fe177372d317fcb20373a1678f7fd339f7fef5        15317025301817651812016887641541245247670327        0xade7e0a063539dd82c3face604fe1887f9baabc81e7bebd9781487dd1dc0b802        15317025301817651812016887641541245247670327        TRUE
  85. 0x98cf6f37077b4b0fd75aeef0e4bc0b001d72133f515ddaca3520cbd11bc66c8e        50882056680208638353658905458969865362551939        0x98cf6f37077b4b0fd75aeef0e4bc0e274997e706c877bf857a3437b28eb2987a        50882056680208638353658905458969865362551939        TRUE
  86. 0xeefec36e16b06e8f75c7854248a893cc2489626ecffd4bb39c058e96386aaeeb        169026533611636270808726034057784938832697528        0xeefec36e16b06e8f75c7854248a8a42dcd288aebf8f2f55442dca1920d7e00f3        169026533611636270808726034057784938832697528        TRUE
  87. 0xbcdef62651dd511d7eaf8eeecedd262ebab18bf7c9450347c96f2eb10bac355c        561493990785917595026902136962363841355889372        0xbcdef62651dd511d7eaf8eeecedd51300514b3ca66df4f8dff54c75cb8e6e6fe        561493990785917595026902136962363841355889372        TRUE
  88. 0x9f57de8604cf30602a077eea1e84c281b74fe8283eecb176a17fa01b2c119a2c        1865242663102165424467648235958100379086760115        0x9f57de8604cf30602a077eea1e853b082ef60b7a1953b1cd6d7791a5979ab373        1865242663102165424467648235958100379086760115        TRUE
  89. 0xf05c83dc99b2e5dbad276306c2d3d7d95646ea35c250008f3457dce96930f696        6196202006341606624652740411386965636202930259        0xf05c83dc99b2e5dbad276306c2d633cbf6cf8368b30c62dd044b52cf26038fe2        6196202006341606624652740411386965636202930259        TRUE
  90. 0xad5244734c42aa08a2eac9c9192d4b71f6cdf6f5d596629d69a29d3933a05630        20583337526463625567756523300038324289833111803        0xad5244734c42aa08a2eac9c91932f223e2e00fdfb8766285d20ddb54ccdc477d        20583337526463625567756523300038324289833111803        TRUE
  91. 0x86359369b8b025548aa9363f9fe165361b425812dd10973c9749e67c655bafd3        68376367215708864957117111269115914940522281377        0x86359369b8b025548aa9363f9fefee897a399334a9ba45415717e8ad8c9ba61a        68376367215708864957117111269115914940522281377        TRUE
  92. 0xa8b2d3356cdf3169f4c7c4404c7beed611ce601c1ce9b39a41461ad09660c243        227141375280198450377273991755786428149468479873        0xa8b2d3356cdf3169f4c7c4404cb8a19b79a5365dfa09acd132483c12f488268f        227141375280198450377273991755786428149468479873        TRUE
  93. 0xbcc1af3a8264e29d543ff5b815cffa9f34646128ea4c2701eca830cc2b6084fe        754547316054645058270661604048909995453694991506        0xbcc1af3a8264e29d543ff5b816b196b2df2ff9a394f85c277a238e794ecc2001        754547316054645058270661604048909995453694991506        TRUE
  94. 0x85bfe7595028ed439b4b96904c50fa638d61b092335aa9d0f78258bc773ea1b9        2506551928123779536221075647247613569800780341105        0x85bfe7595028ed439b4b96904e6408211326ad30effb1455e94099c731d8f5b3        2506551928123779536221075647247613569800780341105        TRUE
  95. 0xeeb84d72b516eec94e044a0ac0163dfc1d9e57694c7e85b2ecaaeccfcfe71e96        8326585271328471754833874947333005225387668725937        0xeeb84d72b516eec94e044a0acc62e51203e432634be3cb2bea822c02b62c31a4        8326585271328471754833874947333005225387668725937        TRUE
  96. 0xd6a9f102ef9854f901d982d91489683041e95f3969386e0441bb585aa5b611fe        27660317547301361280576582937658230939432617337752        0xd6a9f102ef9854f901d982d93946fa7748bfc5d00b64e8b1f3a16cad2c5c879d        27660317547301361280576582937658230939432617337752        TRUE
  97. 0xa526a977e8f5b73484bfdbe33af660abfe915fc0e41327ba9d3c4caee256cca5        91885585973886290244003098628617978986426801828953        0xa526a977e8f5b73484bfdbe398dc59261f2ae3fbfaf298fb3941c50247f96797        91885585973886290244003098628617978986426801828953        TRUE
  98. 0xf30740eda5a5a52c25186eef4b5fa088034adb908c7538c370ae2a32f4386aba        305237309561841027228219838342591757178168112672532        0xf30740eda5a5a52c25186ef116629bb34e3647c5fdd05a4302dbd3b95b069d63        305237309561841027228219838342591757178168112672532        TRUE
  99. 0x9538052a88fb5d0695effa535ce30ede229b02b22bc6d2adba0cd979e00a7175        1013976394241310634381657187277255878939640732316544        0x9538052a88fb5d0695effa57051ce2eed232a00936500592cfc35de170007938        1013976394241310634381657187277255878939640732316544        TRUE
  100. 0xab91bf96a1fe68bfd5c5a887a5a3fef440d5698a55fecf243b06d853302a6aa1        3368356671582794085612439374526108332355234067825122        0xab91bf96a1fe68bfd5c5a8959d8da30670c278c39c22f6fb219b93413da46dbf        3368356671582794085612439374526108332355234067825122        TRUE
  101. 0xf350b95edc1ca2736ff509066d828757c6656704a03990ae407c9b5fe16be5cf        11189438660932168004573366175465558880209217809199866        0xf350b95edc1ca2736ff509483be7506e6be074bc0454f30a27bff018d8691294        11189438660932168004573366175465558880209217809199866        TRUE
复制代码
  1. def foo(x,y): # slice
  2.         bb = x.bit_length() - 256
  3.         if bb<=0: return (x,y)
  4.         return (1+(x>>bb),y+bb) # 1为上界,0为下界

  5. def conv(x, y): # input x*2^y
  6.     r,rx = foo(int(bin(x)[2:]),0) # to r*10^y
  7.     bas=10; basx = 0
  8.     while y:
  9.             if y&1:
  10.                     [r,rx] = foo(r*bas,rx+basx)
  11.             [bas,basx] = foo(bas*bas,2*basx)
  12.             y = y >> 1
  13.     return (r,rx)

  14. x,y = 2,0
  15. for i in range(100):
  16.     x,y = conv(x,y)
  17.     print(hex(x),y)
复制代码

评分

参与人数 2威望 +20 金币 +20 贡献 +20 经验 +20 鲜花 +20 收起 理由
mathe + 12 + 12 + 12 + 12 + 12 很给力!
northwolves + 8 + 8 + 8 + 8 + 8 赞一个!

查看全部评分

毋因群疑而阻独见  毋任己意而废人言
毋私小惠而伤大体  毋借公论以快私情
发表于 4 天前 | 显示全部楼层
前500项(最前面五项不打算管了)
  1. <=1024
  2. <=1024
  3. <=1024
  4. <=1024
  5. <=1024
  6. 1093
  7. 3628
  8. 12049
  9. 40023
  10. 132951
  11. 441651
  12. 1467130
  13. 4873698
  14. 16190071
  15. 53782249
  16. 178660761
  17. 593498199
  18. 1971558339
  19. 6549375034
  20. 21756552927
  21. 72273704413
  22. 240088049208
  23. 797555235908
  24. 2649421145384
  25. 8801186538037
  26. 29236908829047
  27. 97122908846869
  28. 322635319555596
  29. 1071771332434694
  30. 3560347300509670
  31. 11827217725119449
  32. 39289166845424092
  33. 130515787168531371
  34. 433564060221483867
  35. 1440268632583183540
  36. 4784468834763081346
  37. 15893661441312481253
  38. 52797600472523900437
  39. 175389832352315422663
  40. 582632411648741041920
  41. 1935462977247931791628
  42. 6429468840734244393709
  43. 21358233177237966605394
  44. 70950514848622174528405
  45. 235692508622360974195958
  46. 782953566147102814617343
  47. 2600915448376311691313555
  48. 8640054100387830930358540
  49. 28701638457425090555526915
  50. 95344779161019984506204705
  51. 316728500595823403320105922
  52. 1052149304580814448477908456
  53. 3495164334903208087022834978
  54. 11610684600363268945421466506
  55. 38569859374822790062833434036
  56. 128126299473078543553061211470
  57. 425626353913571464421883265664
  58. 1413900142989964696264005783930
  59. 4696874608363622635125333090739
  60. 15602679719686195079367186445692
  61. 51830980116354846807243775876948
  62. 172178789034067414690517780784713
  63. 571965556635952642441117800893573
  64. 1900028451896859912616119061868242
  65. 6311757895441520242197476841126773
  66. 20967205880994316931913496148453578
  67. 69651550287362551109302814460006892
  68. 231377441752049594889305539409373676
  69. 768619224279297761301429695197554357
  70. 2553297795403929895333266596592231186
  71. 8481871681166279123855799525570355179
  72. 28176167834895766876316768911980670971
  73. 93599203537001871992072580403011500692
  74. 310929823888647096110443538025101616976
  75. 1032886517514076534769535336563643989211
  76. 3431174741360378486581976013937370470782
  77. 11398115771792920347496749624773547264762
  78. 37863721011097653625209578965518810993919
  79. 125780558603742221730579006039251371534748
  80. 417833971416397631699844703911091523672437
  81. 1388014408646494398914813637734187755502531
  82. 4610884060191257982903148807363210375587741
  83. 15317025301817651812016887641541245247670583
  84. 50882056680208638353658905458969865362552195
  85. 169026533611636270808726034057784938832697784
  86. 561493990785917595026902136962363841355889628
  87. 1865242663102165424467648235958100379086760371
  88. 6196202006341606624652740411386965636202930515
  89. 20583337526463625567756523300038324289833112059
  90. 68376367215708864957117111269115914940522281633
  91. 227141375280198450377273991755786428149468480129
  92. 754547316054645058270661604048909995453694991762
  93. 2506551928123779536221075647247613569800780341361
  94. 8326585271328471754833874947333005225387668726193
  95. 27660317547301361280576582937658230939432617338008
  96. 91885585973886290244003098628617978986426801829209
  97. 305237309561841027228219838342591757178168112672788
  98. 1013976394241310634381657187277255878939640732316800
  99. 3368356671582794085612439374526108332355234067825378
  100. 11189438660932168004573366175465558880209217809200122
  101. 37170510653769395684235877262453912936304412009379882
  102. 123477763642066574126133046578034563607967724424662578
  103. 410184252136442231063135426963787620035712386509016146
  104. 1362602591252409029611893529248711949215855819826599553
  105. 4526467830047698435234945887108070621935061589408112551
  106. 15036600655239283913277401937841552124255764787018900308
  107. 49950506168241098785379975636258717640605297779920619707
  108. 165931989794124595051344311842226841677570838397446803618
  109. 551214138737665568487942324142637545737921212274918747543
  110. 1831093733771791620266147617728282531053250131616793411683
  111. 6082761718588714802846262156754918696643632895594547849790
  112. 20206497047485187455071250625222530538922675816510914735329
  113. 67124530241299580918148683593855126581579425571547976817046
  114. 222982862864689457677036281817540230668334809770088448647681
  115. 740733036828627826769427101811747812810139563755000438429000
  116. 2460661885852254047920888128961706431736067707404277211151109
  117. 8174141850631122563358484660893538080615003275434141576669529
  118. 27153911465206103378378916009363375040903421354479516613587959
  119. 90203341382352216944533306736137093335381018539143685281223881
  120. 299649013990751674066020039583972980502107017470729281340173571
  121. 995412478181174294849302780957883783249720648587556430052973293
  122. 3306688677271496465708798337987129355986523669625270819266506608
  123. 10984582018074114403199600885055471765121062227366495638043480118
  124. 36489991616434920900091135401572416008505834369446077354297717603
  125. 121217128332839480495208473719193873725845752821703438467076723385
  126. 402674584190426368648924321796118760022211780590622953868335087358
  127. 1337656014319263864308183879251909444294942509014316043617586755493
  128. 4443597095262214497753555511785014526727222548024453113889858617630
  129. 14761310033111425388183246068960530981948836412353744680148711958673
  130. 49036010516335544958014237808102267494244033821446545083399483638255
  131. 162894100995407202148796730737212322205607957355014838939591595003202
  132. 541122490588062641701534500296268555120803165224748338208550205453619
  133. 1797570004259907594233841512660200147684171300005639866194825592235983
  134. 5971398299677782654570682227846564263275645628780157831531792934676553
  135. 19836555777462251363115157322975224154595221304206833347327731612903711
  136. 65895611942952077535971489449174457214372440576163059082914491856228488
  137. 218900484643087716590459403407127150143282409265956354055996012747910200
  138. 727171669920332696650998102974719010882994081246315047545112063891347946
  139. 2415612000114512687157017669039403870021865752489011037047140447970134410
  140. 8024489369527454048551662288680705063214224617207887398077452742274395608
  141. 26656776683758226835582107882657037415592212398807782300787477861563481603
  142. 88551895384914827173499410639952328502476945949146907605602904750558783008
  143. 294163029134675125981927229004679207356541295195099833802062709043372791260
  144. 977188430959647006751943896861420458194388769603967939168541282859307221043
  145. 3246149702803750992460356028035153150991899813966064639768710086315373545883
  146. 10783475897954042012252914989226741738120465478770817408749611705699328040593
  147. 35821931545954259772370750345655321396856353516005124226420072763805375127837
  148. 118997880815637340858680273889634117773988099383813937714600338698074243185408
  149. 395302403513523556026060478424699692962736349161270926311355051457837868061238
  150. 1313166160208074678594293970638836320698896656660245281887112634077770291077672
  151. 4362243560850562367538494747685729553338804879606912526627986124015136162185107
  152. 14491059441530972352563816994710729135730705150474794196875147458899354374833304
  153. 48138257483504507958284300088417437507169863693415734245757230184319577618506335
  154. 159911829973375443745219731259440914855126056408241316003721297356831981368894225
  155. 531215600693406895484375757378823908547890425229047359311739902253461118746315726
  156. 1764660028385894969339513195223591905969812737045502595768222264128504052904226817
  157. 5862073726219834837963609798333103215786152078907481514137398580429810350162033382
  158. 19473387405430717273358597879532553710420950893378187960082562228450169309967273585
  159. 64689192724726018650012313274969281588660150714575935246027838018269534898686617328
  160. 214892846747850523744292323061603059519972809624824877607075449579201655584868364593
  161. 713858585002009009969488117864717982606286412195923194203081467724716624695460501371
  162. 2371386889294712006693535372770713156330128036615415008130343202752855037409079782546
  163. 7877576731395651098467820108528043325718262628735120493388040801014720392192389445769
  164. 26168743463654170197322053604414127165098085911410408282161015062188533006820403570357
  165. 86930684119812813519465892978652107666942155673740968427812536088569119877257484276664
  166. 288777481885384863214026956574166241929705831942963001313993684020087710066137514803231
  167. 959298030245886329450917032420784617442976518013852835126771286564447175340532695256016
  168. 3186719078043916478159903278852389760973497318694421431816734640813429379414544021269112
  169. 10586051635867639237685109551420552477062801211981707424986722245532114273792547094759950
  170. 35166102343117032483402853099906769913768418431342308821977584195081963298767805701642551
  171. 116819263361284772877162797801110004831879090364951775502734885363580809518477679857528512
  172. 388065192983897774767807148664754056471000532997635317525279253914710213958313131907136766
  173. 1289124667221096148398203033911955829845711233398067974040172545243199451382755725392398172
  174. 4282379449854080896242039848540014892637233366760569137135661153958865184765842744651410593
  175. 14225756607438557812869255268003872566119220336151451713000982594585769677759891045152305114
  176. 47256940545279675360821962517403261053149843063329889672429187978076647097788479898701371376
  177. 156984158475786262383741530253135743477887717796778981018197433185643666108930362411793169552
  178. 521490086492964435195326401885155571909886223130268534754012241042745693692477960806973723756
  179. 1732352569526219158159690026685616640193027130426625109440803925221721555739961859235329673277
  180. 5754750670959460134525670248184044552562078882107563012086515219173570428987199664614887518547
  181. 19116867932932129622744725969251287234228046948289155774783538219354674328453734063264042029836
  182. 63504860672658538001938801314347724535695965655431056113139403768189734513979743100670080458909
  183. 210958580830411957325274923676236326343453970971567936561984135093195798687375547135511671176363
  184. 700789236518112032221424780377030548864159169126580415548471114227084607209567005162229588831938
  185. 2327971453384181081954744696081929389112171292517310859990572416565184087206188524393993632902424
  186. 7733353775092676725978849647245321520576489225580423516015801549843152893256529635970925596213908
  187. 25689645173183607232467116100641371358858633936890189416430731945197559693119803065143426171505059
  188. 85339154048486144142625726412518520806996560561759544841378223014425516207903614481386052936916732
  189. 283490533427586712498853484024869417788644039910125972990244836998263467234822931439142487101902215
  190. 941735167627705240212354950439330938507085974642694249315309665070683335674033279699748258355878075
  191. 3128376511285933699630609793763264802954332438389626608243660923119032524817771128513741592028196477
  192. 10392241824226454749901325072574728877954328355125339333394047010029748841059807463946402376810891313
  193. 34522280084761353956498673808350866127535937308506388971256997699443062648383492562275643028084614987
  194. 114680532113139214503421603487481550989883411956401117549914707564096073386521878672722934443023332624
  195. 380960481563269529422941261953332985484390282987015220099153010474992292962168205253975630650418724333
  196. 1265523326746844075650018573789064956557813913125024098574820840840499170795795429683559796950542468077
  197. 4203977493855660711245994985443381388320790409455831548876997359570662513541937903573362252797313247110
  198. 13965310947113283036961832949133120008531990056553970330369323447911709418380415717662341352682364509544
  199. 46391758789053654231826670446147491808839467450578501323245777916963519350076444410231658350149287476979
  200. 154110086892595053666955183063915642285568306656693353187823129492773622939559894157369685310500283133390
  201. 511942627354044157877208228704358351304454895724856462883678312304575075960453965409044310331582046748294
  202. 1700636596777850784352654056466614443830579691871407696030289078252310139632605287246955349636016742249620
  203. 5649392490029973280872000495934948050916557936311856491056183675680731280472346466560051499232254699750477
  204. 18766875631676241327791998505174637016347258169973730387978807886016366180701192206936236072559661409192582
  205. 62342211414122321201830616364572340433318140174210164741828518279304800853810400541541028385401491215551736
  206. 207096343593980538244716378488599167346786820717742049827824263278418085190148684819703352088065432373659267
  207. 687959162133290376971277741858421484573958154922299897522903836765947397777407264877871294001171993128733854
  208. 2285350868825747333270232462997962026824838471021741415127213106446200036514195671339384187007256747359091760
  209. 7591771257827493169604655664762916768453573901504352305577016068420278744146014730174037155846541817727767611
  210. 25219318231335518933543025016005409282185980288746243399499203495071527278924919305403835429824636775643049865
  211. 83776761766578524922852131438952149784228546890053592162675533491609383930602967821013246196243449767914253245
  212. 278300378611082616216465207575333030846396798014390724019235077125345767105344638230957478178309810408129061598
  213. 924493846525945319942024855694261950061770842012584863161512138717716175352939552516167849584572679241162508647
  214. 3071102082325023088468156411949398297061070402723433047052333653049067151687246185331324657051691171443403771025
  215. 10201980289542575391102375726046027692808759643889581602410386963153230554362612475648485573719252236955085948687
  216. 33890244947318588783471240475225691785025908382300556615504375338755476758747514264967013966835616529642765562473
  217. 112580956833112097374599249523117053492347191131643450810812574009668786023035518731801997675109685087424274407433
  218. 373985843453216447900862321144939353831642066368468217797881388092978314374050217010588921219152694630597122765635
  219. 1242354080457386649061669749257048422883593082273014025888467535024597648064417601848437120737793701280159516885501
  220. 4127010923669347313059417823532242089100043490708067634478174376155689746486921859033728888008623756586288985499888
  221. 13709633535244248508809180835535025600969066711828510271888275621146147082988401041229411670486807431429390461228845
  222. 45542416811337820875606828314620745650812638301316316551860207087624827600962326361308813710217632397829856139538518
  223. 151288633914653630800815437435428940518323221141367259262107504083809276961738382053304818579347286967049372221945501
  224. 502569963438216931832932800801964338374191655394525240938915530320904523873453340622237798116190331858852030363381347
  225. 1669501281191927321847939155382613967726644968225069018320615538185843970258697160275860651729478984579683400867556376
  226. 5545963210441909753103824064615312476350741515542811721475928932388492824256955645457286562006934340023110698679806960
  227. 18423291001978693099468344342036227319319264437354477142474140421751351892114884580593327839588869459837675269480148910
  228. 61200847979758564955541772400372134857333258957854511770507921379988784322068137269361553056780270153751833747643744432
  229. 203304816334890448417911130517661880216923457028179296292272806962610292802288960166184213128063928834657107939035514366
  230. 675363981208787732167989295322948928363966268292688403101123677789093991735149572179252888569053280474243994422826102329
  231. 2243510583452452615203867341489276593807291775978556269946766908888457102551748489595583058083370915997529014089189041827
  232. 7452780838347840674453777025719658772029836742214422232181630223485290659290859378196293532923454763528716309802691796363
  233. 24757602051945881583583177476755613291791413252979027358782813940579283531543905211022416862976333782709868461295661353119
  234. 82242973818400035284555901938189844022612146573890611101596030849192296403874109989573629194403088058468499918664439685023
  235. 273205245334428849685690200110109004183835312088113483525959368764472695336533755045338985777216849356588887250485748573764
  236. 907568180147033669165442762740826256246239313880813739137735089894241827095605780398042326374235525228767851794259936836968
  237. 3014876235656226027552250670024686432920413936475734829318115724761135223817352747380525245313422035854584319172565641100926
  238. 10015202069834669421950178732054028242517112203686572470611989804390648924959469778885041503873900959156484748722800510350840
  239. 33269781131757851511063214110201887779425638804743278234165460042619443473409076733441048014731693476242491654628511134390353
  240. 110519820652339873637889543048979784296932316370874971265996541824853196103479149380630501945146593477679034121960222019714581
  241. 367138897266920360614382184493643617344798152360358857033738757851413618112793892009335878235135699558587722099602183155249589
  242. 1219609017556947796658821731392100392407398886899093794879231384112852508942757828161456423160249151063839587900669126097491064
  243. 4051453460200399251915486069809069285988703194670483403776605292785700847985339318912569139678225497412504641646943696126592664
  244. 13458637074568324399685392523565589665564741329761820456745811547724968837385692648020493281021591754234442509367056468518665774
  245. 44708624616901177539444065877055344610887883830833651285478767622031591055950388886239896866928874119550046748102151822605933436
  246. 148518836198656759000067225016878408877142985357605418593240349569250342183689252723723188470879815809863861429137967467674161916
  247. 493368894588292075977518111374744177006184453319661000682501089113346967663588141943824016434442606831469460902132496616503306398
  248. 1638935992076368991335350916696389873943033236585771459436710429848923479913719783670993078904360019665360440763479546667938677275
  249. 5444427517800581635765402814505284002462535357632685646104248540054216089103115469940848877322519377187853138414344734909386604863
  250. 18085996731959617210394866252198199507635861295060150040770439375535548462675310744877742777333519848875569504528931669765214409079
  251. 60080380667937672608343225231093338737888139150828848786124654753667716199633722337433463572911716216836760945522698160844024631797
  252. 199582704492349707329073342131620562305451964325571058588971009458227917614398089423726231468419305375963527203044680137021316528006
  253. 662999393306738678101766023563525160881653018745245504468200681298856129177766253024940897295356626277729108545500873321046827133663
  254. 2202436311518931472583944122740933446989225131246054205649136216279930915155795142473394002424460753534876866421593760883857328211076
  255. 7316335060434833328061680035231419168344745311259759501350741047490423972209955067623345675929007597128070247512102117424721786248597
  256. 24304338988867900945729002572167661619341565673821433627040097420494582367787326504068253706431142781399768018411363861775100824165397
  257. 80737266514786588715024308854155878599539979833199939435990273223378376912329578826717176841696791716432222342828990286104017860480652
  258. 268203393939878245842055360773522955647776847232982254578463916103454189901695786368170573526934193563092505081985905743691284942401977
  259. 890952389473024485155440951582393715338751857629061341007173350262549462682267747491022500201597537407300402629801891319169720873061226
  260. 2959679773797467496551199529664017808763802325774157998726244841014794514329709477995323838333621724963270053549311479811564347187914570
  261. 9831843392447680735866494499589073238403579778782359986298500686216908078302289903594431127623857084701087455818519221541581548760527608
  262. 32660676789904625698233161896110689461213440225565999449717080643090718508459899025061072545656377813384850489565990364806525713288095771
  263. 108496419826419766526838522821408262108499255367182156478891721402708194041123899588624025626778831400401108269997984908829039706530988205
  264. 360417305216078063695121412799314732940264815309934246940795259695578407771988293157704727347417632437421009602108068080207269712248152895
  265. 1197280372080883206455577828108493695012917429810119230119800478272960946282380715960490993409284726114899698666626274829859990567284146651
  266. 3977279305472680685886328316478694244187075446643871924032187998738277763558922708708839803364552955601288535016217409922205686703210368926
  267. 13212235866063793822577254658886901080732982298010184163616287846868417644331167930050976853020496033692378535909532721663685818332246554750
  268. 43890097519755778534169845056106937702912177510843082938841782060668028075335848064797406482364942235951286582290445116480910209042560549610
  269. 145799748038222860714888718400029363966452224141366732776965240580775726297711035736078948279291321239783318461033851771355841634467029146779
  270. 484336279235671113579936194662052980233983531051423957600787650034701862367199258019980369581454026852043684463862788345307181978568154247152
  271. 1608930293366186497046794719467125641436812176087587193882478912180303724427724980126781018843427135167093436436502432625420166338593715218590
  272. 5344750744248500916864296486718502308052281434366419050982877411356707228189998231710561060049804830878064198981939533794579910145247267554215
  273. 17754877657489234682314251828093393556433873981531640539974317195672648656190396534152247421606346534765968627983386551536267122087647177850479
  274. 58980426911701408118038802492786427406258212922827140244644821556698537476252214874806653224759767357483273079169632734239839446289294165355243
  275. 195928737206431575069433900954564874790497005338766023495014523829190163601649593009893397986837121587765579024346328711652277670915482567396929
  276. 650861176721847910974588408991580212124982824328131943310972985995314339755090436843793334864769792474412647419426741485394476712066860828861464
  277. 2162114028823755100975234012376702175517967274901853059876506610823774282948322435084864768379913617539159404223106355620308080654506566778328374
  278. 7182387336699736425485839487750013755943351632098835329900505909972528795274171546213728848441748654584725396910203626811326061996988402956828696
  279. 23859374282146071764624476391580179839985968062872825436464575089979884490670079737827203988627753217346442493607508630171502940612615921679623612
  280. 79259125754294028788368058936328748857245789321455444367276868299023194320205104935712507640839468470763094168126837214559517608552569842865129091
  281. 263293116619399839288003887214875086051318977941182214040640025308221909870319719504834525609019403102032813174975365683418038517703093481811665414
  282. 874640801288439029691389532287006444456853846483002349861259544963519434879762919348700286441792048259588346962501616370606591196400079410378745590
  283. 2905493850734860325112413801740578216245134088389727528048690401405788465502594209265572627047507669602110956342010138173643897395160882199619274905
  284. 9651841652278600904267762199520802441428740098328553278631667813612111960427992910549512278894383934085015251881736085456475055535962679285191840221
  285. 32062723952108344328739366265719795720959914528693739889093668146672588248444199800169785165190332050292551235497320333284588234885054861906904309866
  286. 106510063495126673562725660041559501834191146303887627472274796818570123129529314644231827061322376981849276712179989232964562420587420872698320587142
  287. 353818772312698149011637847117630179650281648897362530059990442280813781114520628108347847785272116816111132195261259959682001077982670664806639249476
  288. 1175360520244106790663547896765079200518420854839922644887881105081972318887795290288680978525428836311284660617278484127489743045619971728357371173238
  289. 3904463133820324756679307372083575717729740666878207858360962938828610047388135413031940684660573192817732727224647571797595212954765722907695142549096
  290. 12970345779689691931016613887263757139274901620124223928164718834613947657070883071262418593003234033157857855979420984469249785477402964356652958300366
  291. 43086556045954918711604533555725540504683826200474456319057354641773287760936456670363549465211474064286415218310972504201272086547832952126928046914470
  292. 143130441040996587060150047237232122441257877067117344669728104582197298431418330031727193754628429001774748261378158070151641896429330649656347379675544
  293. 475469033327705732527082368274837993379256346872629528106716862395454742050646436221428771295681204901264159010081169609479367299860762074330191151790548
  294. 1579473940060241299199868651790465391731340579369491686069746030178010837476196238303668992139091505197643572745213581805779646263547027782186485437954023
  295. 5246898856628553328082943294543563517493416182805998178147171819463253191890472170498756890421221513237171526652808370218654985478705918943793693112526728
  296. 17429820722866769911591936100265018279932555837535046533910360338226033284879983399586583631331366801694608661789956303626306356615240687281139957949152060
  297. 57900611148141077827952953940010125455124033077241647372486060976281199860283602163925033897230156776550225790303812049852361093799333071932635914244315051
  298. 192341666884158264563658274573666789346769898172562444420655644101085016525668902683155002240896295527680188208661244609839120675494583209536063226866594053
  299. 638945187039951535715918618274143269700721252692339135446690263393425294228948871379693818889968785113594196433216260049451877360395001227438032031361064719
  300. 2122529967921075608225366249221272509978006630893906506883521607379220488933178416803434138652580002610696809271183352676151987226926990989020300357628006433
  301. 7050891932677393013421541059962068427865209430394796472716230348546767791467897441250873717829160465744674339691344677744839128974699492981724829348976987067
  302. 23422556005175684509924842014332807231787195652338839096475882340380442388971615360342356757088436429196518353349402031770793006621394351908712951951913192054
  303. 77808046847665810069076699649589947202541546752314894823655037733886422964243705245056345592087479476338043111123976568686709239834474844133315441817426035251
  304. 258472736831573123925682508843469185048793179967229141738704400600174900070446070485462053754726203208415362960896665938326251189715482139002533953941857570888
  305. 858627846243230281199400210058155227382073990223958121695527115814768196821153511179135539679253001917916900397575851270139410504758592645462265273763040468544
  306. 2852299965488013050017036026214368975167354591369719329913932983379847781313019026525169565806669936955202507714879211301764381979268647950300634008803784432253
  307. 9475135390400884565296093493217513049060366001693850252592198362131192410031878871884519328645662801640487838612430633680340095291256121382757462000916347290193
  308. 31475718456234234746323355029615499433572937144956221166412384674261022964092346996566263175633425376550527817631621372917537492337734793271041077350021053617725
  309. 104560073446529181278631672937060819591661384406066735668991521364294058051725168373928561227380572498565819691435139570086785398812326537009475564145010174086558
  310. 347341045585511366347310572980588904448865043782014918040183626952906452794220856454095213374138698017368727952643045471831788569606804736501464872082884044853923
  311. 1153841977838062252947948169596812443947905509959579541463161221635941978003300909961335216920158170455563222295826650424680699569779707364670191871847846510509026
  312. 3832980083240660307114439342820458789913635110312655697980249462932862004160367504963293115764299749258166442698764295626963897393417760454456795655069226999467391
  313. 12732884225660850243318728861215195690111994524184362628305201936796470911645851158618123348134633739314267970942726601959523188459840616087583833999304360749085081
  314. 42297725838170896180850587433397820635917674096728417010574123430515739973704921636156963750988126674118299639772669011130478703939715528815904340660776309124873452
  315. 140510003811663006905659272453716020225217505066830941865177274191571079200127730625070889458449087269988621015293822154977960391810229888786535027402812504144610340
  316. 466764129274693714382010362891401169057578457112031532501357915813742024734389908871427291610761553452598511918346666689273570544462351493261936622739951103826883675
  317. 1550556874723241806705649585484712381674426426774186166521182136653219698041479155575259432971849673741863352939270428113917105640263079104022731881015895476327372751
  318. 5150838444863881221311695546187949866379439384654658575046691577708272596044686949352594603141925514589650727930474779170708810281341447295197555184074309628064497230
  319. 17110714942219257130889471478454748663443278820776457454204085834158487075356554004382786141108291853395035277678129146544682325697717790882969371018169697095240582362
  320. 56840564690167141155779007576020960555217928051523151420207346572434372081237024679555460673824849839842448135342078774562359544698175755203435741564334427602041777633
  321. 188820268773528808698787405753496264532470222620824705146085790547990065672720647907363343777345121696982232592181743448165498549848793116760614875818440833182534264728
  322. 627247355722968270159236750659997395941633239592919445344908017482966495658785733402824758137563059675603505658104727925770598750908547472960891199645077331863232995832
  323. 2083670613419935663982332982411291099137780696708387928607881554146695282644390610235287628977206536190847173809317392065963031521375690863428375075580573294644804942081
  324. 6921803951210868549568158680830688199085729191871060341870940377778061777739173943780807060034819950645894739954166082296538149274657083094964557308634501462776201108850
  325. 22993735012829737758596028163609979337026682141344164497586983132220577024340675738355459662302568959773801454882323313045865068657903522834593223733342416842982955959612
  326. 76383534345514330986225301500569702856566592651952748464286152620030607303068671867389464447231327120104335565081478292775452613185675737259826102388387196208035582805530
  327. 253740608729157831358225335768405833696566028462128781150474086411454923178203039969129259746798181906484362439883030472553217540375311731072672537423809908155909758419851
  328. 842908056951210899260952483266566668821011101796282982666661362588881926367893439178455309879281043038712655329539455832502073379776653261750901446757582707425309557764870
  329. 2800079955793144346028997318660240342020014567188623954539125551823059534337115410218700579395177912058917445320542567599275663597207309308667838808012691364016659355557255
  330. 9301664273080209779468208334560760275043244454383197455164858597300661890954147448914556398066907927640735468805651065371161983382828437535308570603481712469068042604315204
  331. 30899459877955183430290908659032613828211448194825534550836211895416505130974567234880838715985032513985627342157239467707645361471198012621973364958189915411607358289418283
  332. 102645783885424152375233705489259015373072136206049601297869792682451807611369613634530713008388926566644782196702825408923770273033958700348848458014301130246165690512595661
  333. 340981913310726972668985051093318131932535477972668893668139271119358347514363161459158908735638841889893405667867592898193892838735140976820390843407995185820372816597814171
  334. 1132717397675350993249392014695466944142402851791907356701269499801523063630275195345552852496729403983282996848448438831242514723903511133596332647663898913428898085050459085
  335. 3762805746905449525260717442772212320951092701382789611462330788040823954370047006326878182812925641143227232426828308206087114447489833715577182134510325463950432516115935965
  336. 12499770126248838481816490576492384882459053024545319204826934302763489597645272009797159945442451492918261490044890130583484556259920950582710992598674998321858455531910044922
  337. 41523337562019768754681956624810318939123921454049412589944087584151296564267005458211794792309232641502902374352958539065460047506088064897236638154961388100916435219084819410
  338. 137937541640765183520007073266871074875378368886708095203886228251359193592502617348864291258196306601096037328037808317761270437919210290040442155757533270313104674645270378182
  339. 458218594916153299601986654434094336501337969498396431101191612806451188407206545701860905890884741114012163542125894901280109531089611828028711151432469607618028554274323056946
  340. 1522169224051781148581275091833157212748019328445721071730081517419194035150900948373699686887509619345026544237255091902783794992556155288368681857424874180490627800682270776452
  341. 5056536710550507964722256790101484791409045880580808946777153984145316940895211838294555280886355194106376130533508560714289277293551146334549847523380563056369575497904487768558
  342. 16797451361607058901548186292856994185656895068738037206993476019668167279190955061145165387973120030160594806015534930497615616027558122307689144863032991773502550512441727475598
  343. 55799925600626467832238833905542036733653718077370974792255417344301842871226131194055487647790274028863534505376177838381139894699945594283367808348542343656793171184109660209313
  344. 185363340545345640483862507848842932971445303678115649065229070119456382155447689162116057202469597372947743223455965582782513678122246577193017476341777037255647252198152190889813
  345. 615763688719757413139170102714018059283192076305517847680502232706224655191823565389355478369360840875768882832562801303636056105193841282098313938605223928046992239038050883096119
  346. 2045522697369638556127426361711246571468274391554533266060608776127230815785629640496803815184094289934284860323937708613801025585950106971465771328058334003371773182441361045655702
  347. 6795079317121982045585244817574062531625840083823161826405529919072912660162033709370828575894014393223549022170655241453141511614403591362463946190439561689543772742806516843059672
  348. 22572764890535544918999622259242325478696556086822951280078138833428579486249552289856505238405859466853007036418415785725515845237968631732316564079644212567769951278647979906287214
  349. 74985101869157083023214134646141294199291084916585196422031012554335116442632183012332703075921325889589454956943955728238632511394131862787432997700911406952586334804814684117302763
  350. 249095116597143782243815795241037261296376644661216739570122190884735563383185707567307502229169796807676280770135488566648532590356266239119238543089043325862242301885236798018712009
  351. 827476066123295237899822527845901792813895669674107600168610990704772106409827481862366974884110277493789438518982091619455332630774255286542397479050793810165039251756659377806744658
  352. 2748815991901847223477496964326659550077670616526760083226637648728735192624639312662069945961475117807896971990658328236536074410216010242860780057921302742618054384661202998655967281
  353. 9131369071174418594603297654300199201805770307453077743937332170204796463259725670773114453514168342205071383444098395135846437250477298201267757123876392277171753665108593601320204997
  354. 30333751462319819801796441313813338045025238623510385400836166163405516344613353430384831557113737408998860979909677007578851282337143024369693499876466998876797076159285167429360050266
  355. 100766541206010820729923960700477103452228699320090144439430301086199648538871121741415488795255236801908011151443321780529700640860479598366083347944760060418894310404112483178425762627
  356. 334739204256872421642069042579002852248003229224249539325729108350233766499692503678079152289718757430949037871763069972448343275639050544975062457029374651381115046655858380133936776630
  357. 1111979567081143856240223501055325422317217169666669748919730555816773532149727112278246499796424801571429396203186893795129134583304722964746108341992031715696373479641341092640894096190
  358. 3693916164827538153128840835138599683930778312701132124298236853446117563316003377008777572005891628368457897261480333130112445787976527804858010589308753914463299349699814145027467695447
  359. 12270923888099175776593060486848129441168900437266507030982712480530290457505260482130388427218739736731982299271560483768482431426649455451560823093786275332509856618608715819247622154383
  360. 40763126814101120102390428700183488676365929553902106115962174865361084936682542139367632256291054896085942007384391550242480780368306031815858062647279021182948031187135511196842052506359
  361. 135412176199218890141295265558281634906808065874730770539488662828907642043576337067343378453881317662099404096917052257589689412567259747261472480094636282771198232409728444696105702720410
  362. 449829512506023038618236634065382249265122936058474898849498884392868870338239925776460297546791927667516159458680155151414378855813797796820242504846164497920223014862969839960423247556106
  363. 1494301295503244048555873035317873297553943123510679829566156807359176137830905498735359934322676017818512795276828645836674708917198427827196446747150277278949058677244042532773031227204011
  364. 4963961455758808979039473400747458986518720766507657114880606388144016084887974050210889741617496580718343227132287836030825837045375662800300815938511850484459873384325628174491152552815197
  365. 16489923021823158127570589328657174891138397975113625604856667937535615696345579389781169014544036342390948861509573177762191352965789457480693903336445151213943107308219885254086544582419088
  366. 54778338568724260892627006870713123968605932680118976536139733303428202410860471144129629717047349427886660220617261496812289504067285536504674812825980493675602926735216582600592952273290248
  367. 181969701882697107123381604899983524882447354380292482006459537560854987116344114165512198269258096891753991745006311476764584965819012720918245517212684652792167905919358530239626051898382700
  368. 604490265102409274549581068394081006602843383313132261498249751366261459130962178400209859680766218708005738790722185920837913453082920493015924176209548717641438584027919708953036533131495499
  369. 2008073194729603057118438258903535847360066431702830155245543030115071481494192459934551484331584823669356488926909139140823790323480823705350818249085652240784397632797157108367463414104264606
  370. 6670674762162489673680740454009099033662883456249755573341231517597258814236273287272395695129911333642007542835833909887475035007909937319883938570438738020977080408008647958042193737495997109
  371. 22159501904283648258816735586410278502528355463274020392249195037785668746944315511673388173844706039790299294820533382756223753580111129586702805917139036772321749232775873144645870050459875404
  372. 73612271944549857733199449669637150641413306384837376077326449007611715255139507642304229912043204190718188449665143898151150163471566436693351632904136906079260535134789366474430490800960079269
  373. 244534674301088941052402614501753107536921007218155654650835767193424832447297380013691179564422285444057314808447160967297878291680583999424533336954189023606596713589797190886062524079162660441
  374. 812326604734918030798204316928527662688113794357369416170434331817310514448135405533264773968550030229343786213269973455713202088429500466491021028428720064736706707865813239771704987750962705493
  375. 2698490570493385672510813969010615915672031419563419996074580200227910725948999874732186012109133493740792674451560405026136146527275876859333230970511742841383458087103529133762519294708496437956
  376. 8964191639910604235029684874593682102575841289135306837046085437578888585966726171515852701262439286957468046931205578848445924421759883480819119597116695945328268060464191481795198816060214528664
  377. 29778400056573453997211051906944258208459446438303762219751418290770321733015037455697620945491707634005434012231466108822584453915426368590255313151574470165402218477744846770635045546008505552327
  378. 98921703768726777197974664042175968129226704188282419539621998010573903734206808461487223145652369786388752416052763428679960779074071166741162483608344505621207266223110983349525907912635554063289
  379. 328610786943458555095580255386173577743306066660659778164131038950472704763828111976432058905718231698005200257741191316414632798036946737098478042898358009053796384080096452566687519082987109400544
  380. 1091621405430520203134315597962558127581606190886426370808944862416787396107347136876031722590671616670562253132066284927526904424859478222048401632555631141137350446501527085562670430755530351416952
  381. 3626287815680072961134794112011110683314416136156118714264512064778876053292215674349270352416838111506181072536314218157161358269169188200846799269447116130125348546855723928921940344477217333028783
  382. 12046267375055359355738844368426310083706995461129852064368656467456659195927857264686446984240478934386118299325348540673581491701322217605505492203275169437752851863354937279577938707138443124099785
  383. 40016834031721437150097360716740709000725825147443003136580711722079225045171900062610919098705339485665580689139998207258915458765186971442209570594392365790301023875162929558096683119971580298323247
  384. 132933045238420161051688952484375737138972468949576245467728919911953224525463318862693965954167308523477237824659162192285839172901774562697932160728683089727846181741868989528473423387967083012006733
  385. 441594017716440640305926018182412684260490960478600438515788900546251689400753911135401643794917091648668027639480068988366451192034957933172478548759344897374081943552871037293911042000339259495929300
  386. 1466943573986431793081952595118661098024141201765086602544960839834484742338679168347494807264681322238474976059650707926885764027824118896694833592983582956046901421648519418883169966554032709824936484
  387. 4873081072040005842259610926570505728898053694016487198347425543875343880349599021661062813425203548915601738945481890322192744568568131001652783976332651563855915512363545403596276125370041713255313862
  388. 16188024921873521960774166779038537940364129062019302953670897435859521644897081639500887657708087480691732931246917584576901780591005010103047584700802932428229609756703867821194736543639586082044492143
  389. 53775454788708451518278603311563209669337453964007558303596008392787448010622727045856877457288974110540970742382644694197149532764353792257168680919402066277889729867945584585919082067353803382605867493
  390. 178638194077955752892909190629999910540934976345500417341446496393703962571290502967171332927710977723822626991870219952004473509758568938815107714175534705906725165572099208213264640114952494600862327421
  391. 593423235727502448940205422748743610659734236897042505026701213331307453642547140395191203330469777729194220712639595612346788279746288247667889126096668212471028674301311990703689853617714800084276699399
  392. 1971309318922156349324227517464134282698722315854748737550848668797561132987214889744915562877266616409845471910590413226998604796458915689163181660943216466597132727311163797699085047197197309604752029902
  393. 6548547810240782641498034275340731128608262804765734619846824784413274161703522106581734234108567499550563682536200640434824926888424292641907366418096904425504335673402490707226480780691230290528351967517
  394. 21753804951551971521376150219098614714651584759879580031207687495776363404027197600228143220892626013696955656891241691527663750304816889205251018900144449019334709958302971943128637469306458910217968468649
  395. 72264575839260310534869492810731627854604415470289319035040917029675335706688556268154948316019348036432426234992124954824237046380495422554385887619109376072559252406985624317942912831809890741350472702725
  396. 240057724745557317429525923108388840469637149692562286147865573074238741965234685808062047391225673366236235508552839258645036894976077739309072025251721884342685096216837301105959823803687126128654314610492
  397. 797454500227004040711042650137403333381949590105320718210239860923455631793508465786819859696536651100492993384267553490020432123376038739010269009771705421251972118890264217421910353972883398522677047891754
  398. 2649086508698445197930718799548800373416394597034636116495440517823187350444861052275393946936825734498932381395844821037402195089719209934660126760175487689697398072996956919596949945610234822458620204628332
  399. 8800074899032440101195685150840267932038197472854815779400145077142917404554582457421584411756953714163752875635717910010041783898972802955123420414722265207047896849154903325847065226835509457414959305611231
  400. 29233216044208931313374239737078650555458145183673591998030922795281937867859071307920767931483049550257037477824300863597325950339724561445197247845015600821935677589574949828348775756504556276482859097255292
  401. 97110641681169650160403733876826305228545999784660619053023943743810453687234843028316712644858763529217068293282941086995421461564768554652846838309141694385284995431139552510985536017515687071478601050952077
  402. 322594568913217178653392774684737786647856623471396047572469101113524368713658698201265224674952208145326147574654294321149132852338288130755410209537959267700619362586632467166237579707384496393319040760116967
  403. 1071635961730893467773168502785362296838074723698956132267175394477007354445322491860715328382405084928068632571400478629156445633608660887932215305812670119669495831785923628656737567103015887552380945645027326
  404. 3559897608765493281380565477602725098399596510058168614367753020717724711131938765832032117092891586611234127458548444468471398907397292083252294242372511921656824701080839938771479969870441748396942483594224971
  405. 11825723881480431889478431512335038682094271739052266001385793237180430448909966786889063072038700824542432823019830403165818539388147193258125198027781132290997180453199193013476895873281455437725199406757003132
  406. 39284204404270275113648487785731004378100980122750159133242650612887369635302396160247918705934221848075020759175956872198872653520329178322904196126056386843249942788522717323940778626187294136259837240917181658
  407. 130499302295843284323528768928287584325697017294683170659673958778824819892050795746756914975496492640079652060087168790995029939659672241254469474976422372937154361259415914179648755197714528325460478111944259382
  408. 433509298659760672896238066164509386187891662921079510716719239290740758533631049453376277795131430149616557600089311554312421624230673619823296203683771414013571532632402189883060461144798024616088683240713106419
  409. 1440086718612775355692698329551528219588582896525326573223078908077691574342143404759585783099843171095754393464057038996442696594586922712233445202470888884563709585715537617113076946903583974367345207983357870669
  410. 4783864529633929893151513786773643225913193385122994118865632579113706387659142738063520041118181053081253445945125332171595789793308485374716538438242637688268590841511635878752135967486936679649680968582620386954
  411. 15891653983126068508595937175917609298432877872923825555278695775574706925831195803253050684110427243919852788239370891731559687758778899950908208590243537386778148449300576065505515223256639690586378573585992367190
  412. 52790931840775144312482985975847281961867821445862823844156123513597366385005904886803540120616652678299164026389823819966302712916028250584372242555699017669235097780269348131468590954641464841614032400142237972127
  413. 175367679637154771853033782048440401168822147271215182230678191266427284454683097488503899180043788209025367877767496690362944721195454686763371022991264227054380153859873843932698509216552225077977052201376442086692
  414. 582558821921870838788149025364231321238523488061882033161323053423428653086674625192621778047000368777879027830611748798013937358509363150235922281674367574824969608500664515658625454111012373627014029638090306448214
  415. 1935218517466746576402855781293123039007763160462050192702935523873746857460230745298760378405762692731003023180051019729154080097719527423424098127988856515493318546763838942141088171347162985379855713264546724669096
  416. 6428656762919055210232375094257960333331898389209370139976015753336052030873188641109108930628474447440525797121329288678114294143362844298263005559345043420563846666489550870368332397056728294106983436070625799728024
  417. 21355535513128454909604263382622617261026437563357119436331669719519616532752388144312281314083355619534452242064701035069927001801003455642736227833028416180482434227018342072363453758854633546686413705375668791944948
  418. 70941553402426218327984285498206023836659834881905399271483528151403771338615084246271377810148190827668486306002844233007964195638010015568911966288924801489672434849312244092303250496290263881398555613701177234290036
  419. 235662739342471805814653281261152621387418447157079160657827096125806314350248203262961159483529396430705258327603494826399737174756423979569934279602535018218491192826713105598553571872606344987965382969059088842840276
  420. 782854674739874420827096171136172553396566228494418190777498079936463940662242335474120363060763093975409723415565307779384327927365753544871384515050716640187530931914437612228223407856777581507345053185427730777563571
  421. 2600586938232296742795939701780190860787372779715197713301899890552849223250729735775179737814519830135722557221258574327301116041369898517471491201254142118845491574558242907024307738140071522493903338589485116205514447
  422. 8638962813310972179389220413781350698575776060576589062074200836275344087449861608837811444292110441175785869634878041271193672999646059080789154617408506482555442164697519352587720599637613743710741466600529159700889764
  423. 28698013280224885966349463354313959748835633911892336094259191367747028875903797595038601328373306689364440170971105904334674053395561188343378439622504539253196117761923568047678046630944514432507449339454096650161718596
  424. 95332736583029679773116582982950507322320705923389150932286435064132413355475984455377191321601171975754750123254884872719034134476645225457999806248655783648568227470763538119243283936175993971421173640757216036958637215
  425. 316688496017662537837359432877081478578177303893652861513688719803278387842933958014314861576524171971223793384114629905474022824714919901304605598850245981740790999673911091609790852335842581791960908013880591176998634666
  426. 1052016412248697752023015637059564855662056726597191940591881821162161840369459659241581715355737640864620454441262980247223960247043349048508638601204088190315403009349403983044588508786863912444911238416872917521177714172
  427. 3494722876131554530931015288000004929695050578802052522162313426934252023502484313441844484273519436663002637617496040750839332080835833780831547311568952825332696422847442213637065727326752297409027788322212983784270659058
  428. 11609218106066978532712943390254482580336163592855797724753027522242432533753928633965581340939171740797707935089915293868039779125768105548181107624689343871096669092557679549435043258346405409573369450708044836802214790052
  429. 38564987786218950869052241774394856700033958557802690844172702578374659143220786507128244284405929800736207972742483873884424453832550222307757006608568472852519508674936332680696792500950430844855838186645905796081333011767
  430. 128110116406028717034679797771449948791740770128782119746180673883316387312774990738920120919022103847732779920270489614476407892913506112659370531436242251953986962059112453420278651685686582872370990910140549305985142002340
  431. 425572594928477199768272763230824799315339725719744438844386124631762274457849165802846367691948468615279509649726534646263207211860694413503778406451313654537520420091124268882535701118171132576992646536537436602524777297163
  432. 1413721559507027427573673505178321102371361189683426382500280324335429495080453045478166375533037490042744295469922150354097056454511558573729247442914885002726747405129694874118630833403027029634083133726421162843800086659036
  433. 4696281366874370484364581633887473861571532656577165328842678298483211409766569334885949776119967445219063103925332859446126264884250361603641103831275119028302342307665753162944315772236606865182702971225576322847842312433343
  434. 15600709014115995540544365835260259416496639908563601734728263915798983249639421242123892964427344546977039611701121485594417669986800387467147975616916218572086770330393231164103725199649258942626086629343138203782735712457408
  435. 51824433574154449940120671023459233589238800580156440591402985034636958198985373112575256788911958069472661150311535519264347253723888897921561136668693177890157052022325952402427411997190704336556393323228180326985808153678614
  436. 172157041891607550604614577524189347917038130708757473472855317978633106788375908406735608332643103151520969660248300535038365239808225116730509552087376435394302548763517007247643931652138441104494532362272085352061400121115470
  437. 571893314192431702071341665308662548305427185166480529243245556999466979831208052063167811092560417580394145975920627887394542869767747448648000958324266472690780145305794149281503178546082953875878347104887792860788089524559681
  438. 1899788467694084387300162337985575527025397558713247401581712294091956974692978540965203479795856793231166404477186489464754122443410914089778639437007387752724300991310634058229372717969264307954826413329549576525043058372865978
  439. 6310960685175991078929165296599774038644090602951983528465774943281736438996699906519700956683908950736494237978937038704455328382624479188030212109387557965468503737804081860660472070308146518490331152600725285258348650817815856
  440. 20964557605815722990303212889646617897282413024611510442541476544680071920301792186873670446567230353955254375377031659400873163918791830968390948882794705664739421794509297831026633386628258674886437752349827508773728209574723645
  441. 69642752907643787047569135093748334602244538965853592349880168680177389799547766015415130768950407135914843344696910703242044416963983695224686743378564277209741858696385966381368643512420679491718091446699390102749259347634576795
  442. 231348217489200440270152530368354174414277792953607523263210376860672809053729592562298917246308950143111755170528359739973116612577484716616358326758037833339169437197771977645606746112958041537477264609609315497094432957136068014
  443. 768522143379486781577418838785968049610139751120321981701483417516441803635372564369057969725166016075331050081855353551949465511144595741973596535220806721262123971494753422950914216241047517238443280958553107036942126990490808545
  444. 2552975299635370856563220932099977112933451312023356183201325579054667039269134434860523488154368916422314941632881036589825157190459790738084379360964654392199465072395213800018884344502772162206636017876903981142603378410923849558
  445. 8480800373412220560465582835246281371352874103820936607936635808110180190314880557340128433939102709241721958305936223452844954017210910199720200166112169808903431917623530109216317911486563394026267125719784236035870344425370823188
  446. 28172609027569289053905595118106721459958214229283975470390555698637064963327191144611835527270765034268172030154164534478466244003471004054189998624099928942119870145099758451089986902161606360343264411087738667564970598690631983992
  447. 93587381434959754332112117902724791502407149133774679759531586631243063983156224993868385610136722274057287369791668471738233699904504147793949716946891500535280650708481636085058558244214533989892963490949693841334790064254592091715
  448. 310890551715732760196342482691468389538929471580144030902772183777214877583980999844214171343093253224986513155772835960949962667070389970452807349921655286468305008044242779798500127701062332790357777023422937783190594932106963779223
  449. 1032756058179525127793566635813990511528765417452929549570083792961910475368419865828612718665597424967077265181981097619106480912325293782300588435369112305949021939666168466050840467753229471835402658656054045688932084072526605526598
  450. 3430741364831691858159868868072451617604030393631268080504920003087258403665990637823858368693431917434144303170070686360947998709260215503303784110475267510055281400838393130034926534005742056144046270395027476353048797519591231663452
  451. 11396676126126611477605205750809358854938956987315715868801309554939483915992064214581709703655275594235350220047062809491110158530987716873133403021055160007064225589262413869938166649398387662930159445916583014338679118710485695533806
  452. 37858938611712059353676911468354731549339318403967739689192497176659363960566915390018337962262659428428183368668690591056940637267572566158230708693535818756705105892381301992190210142325364182845039364902814354354468156850785238750512
  453. 125764671816862244059941918935779506766196718795455753838517816935249594352205277035266614012780211456027796239254637232148716363812419791698539117024940483446159120973977765519032431169853040007013144720855731177533770141366589356236364
  454. 417781196652723545933156753011325330866573325649192791088219808719688602718750957583223996390873148605633007089329056572740225316141358634980991054539748361862195049357658452371726312564088030709218549779155493019152041876447643035533445
  455. 1387839094676344412408485266317742079344840601263188344377533609797484849980540139311818482582310596288808400816152780022652901813925033483347574328462612135555645480371951825721335416367521063270071035039970124105323502682711182849258132
  456. 4610301679788390498317888922442896580086672756184481979223365935054477555967347140986461554280745615678134974056441673033975492357478707334929606050666180481093464815025311251087392150713882377463420003986182869027090191109441650183548260
  457. 15315090675995454494372358737901715935617287426938639972974114889639312507475115601868473972336608615421963431457098343399826990428099663660072876217099419034673134052380820970553474184657246985310836453856589213893043121306565727009620174
  458. 50875629992336786521252267429650690200373876791555219708953332644253843527664302721339960999865104153471743532085138312373718451182524634028516854436965422369939157400266118041450281475586501703435942846831025970647348339973950058655864547
  459. 169005184616637694334010047407538033718613924790113461168147870290330587615836402077738870481740033176429540414483937125337549337376894442999972451136613235521187461362475293641205129005755956437734655703362594256980327270023749715711249910
  460. 561423070959634214051209011710569398226773880714287666390479355165936833651495542436178514512903815471193195506918928137271505557802364583023693151616358236883059714081315493825079085082338678195820954763128541132466272041679997536036542456
  461. 1865007072538750130015626735929066954178656389563348831155589350760343022120172364110422519982148016601038863982605010684675577478566196414946646915862524319373627994197481367694328573785544551602187890726582925253974111890369347420760293774
  462. 6195419391430107015227799568283111126110824740488132859931634049832010562465335246114347681767317926759743368368466118024349347160980223421757178036214637863752181229660378489123203289910430997972747868833939288004065902584961977594530618022
  463. 20580737736001637228532438513371398776539133492572965438739782287178976417167352007763613463600489707924954547315182942159152197361422349013454235360003172730421704003015530903038759187068719730397287513482572575177629741387086310832668216030
  464. 68367730898732365697779901019716872772572318464610027299242688203291185301312541743662842767827348514199332169718822804510083912352800758386469866314003795963472494301430973156909007137355695624948935525819623346281355064849350729572261895897
  465. 227112686056197864807402302527649898433236404554510547934943857928004296849353646421204697059189555576527212495400940060062576140766846109643159510936732071732997597220567157066184063150183354201431873278076630913271201503805169483617928857136
  466. 754452012515416996256486102497005724526128522358612737335159975631425692085794689220549202468968512462228152069275559680838593586843220860020522036936371739509738821679386628978092518013016764194109702756563765044669236810445230881857502368944
  467. 2506235336619275637170682058196752566032132756887195645491024574494051005199401137877990462559976770190362504620983827697275669721262273527684437967197696667064065802103741659382333276846873561556274698970257825454141107707438891069071136588418
  468. 8325533577115057593665080185437869914503754250908208922924384563844261335131515699510265143343829965279398864743548945361782047441825372742121321114300658256046751031385235482013155088061981994970152535910744688128963452022685688360606142249169
  469. 27656823894746590313086062923153146379494346220876313382001299493023528592713630491048216042550388819836735367224715259608368759961819971575779029259593327816128832944491005954007090605235999623979698542372836733182318267661177358707936933189673
  470. 91873980311310821557627134808306100121710209297674821560473531837603194482503915467113167409167956641511405215968459339196441468193599611319908669499666318723400641590265722489783499986409569497685815452435877335484719876376989337887877023562942
  471. 305198756385271794975738690489771048481779258069079491329764833627086570068523612662804478737354533813294352707441945296326245886978261504211248686669324199371255565409703897368427109595186841082853288366391934897972384949739394681061415383482046
  472. 1013848323360918148588850828101416483705374344319644155254904580022427135048034887506540481790992276839779872029630237124960878118486024875249956933881618283942256817434460573919124622633730267518306136056634376661299554528371978028168370208643215
  473. 3367931229327081328033701171828206560537992725373377424638303936767220974416326291033748827021245393028137685150230936106961025295016453114627982971895866559567557985031912239544412455554888314854101476290546179707445870390809912873062562573891052
  474. 11188025372350163541739431805468148614288288059802968964790650637121282739180261761388150882951521021526726424472854897440899724710274364204315572092636578450500810642779016876641091079517701949298838466142423520043772508105277776063083940899681725
  475. 37165815810722651537240106027590136799576019929797790382376982686219464503214755325737747566349604656464450103672627926992698517935799051834202871248609419628598313469046063628581154749645350849849087303707291323666397544612144356097171399517151891
  476. 123462167711048508162048886883634848238012329324609947437211882107147407310946892973298741621662386694976639070358368557625600800861189639107171250627764514707457264309088089078622578438632291349198620172714795084461332777331890950105431504651293887
  477. 410132443575027392473533647339502214376738854358218447273807232981296647716539033146468693711658885058381252465224930510282393160830981365634190904427570794735198218896657806780834907909622296499303414529424643488476850863379063245802992016652246311
  478. 1362430486936689379945923186433293062165930886453765729030414916908539463440382942867583869369390695343864902634771458173080553305968390068349386959247944541072842074301793431965526698221290817034885426978980990874164435307235847104273208288589390912
  479. 4525896111886057966292045686487236567849913995938941499920894774348800884952908747860259533212318026374999059314959686158515594602442167836270431823494271972642654891465208480053773174427312865142286946216648693872732852895530674514933044162334502797
  480. 15034701448615773085198413890245347051383375881401141854324785926311299534927157963877648943799440768252459630617393194159461263034373374788496622498341829073737462634643222230327917711418649869651057587147882523395482989546082974453057464632004684487
  481. 49944197140400462000222651759649534091012769894438147150312047481962102667066493759258580676732303265186445452236338833016908240723657565024619055525718827937172452706304155752192478547885153430083498320659494425925830047406652996035475256716704624596
  482. 165911031657289357166122908777499172020290731100669746862042998992157801386924316376801467392793150291096380304336415960083324289894476281364423085853354689059939303645696744154955304631505265585100011931847262015698283161010055847560187958311205021413
  483. 551144517314096098046343093775994013796484679032133698994351586185496710941985349940189346532546681795091546092642021247258831518391182724256344878645653888907667522928888157426258678079805513132397034784102884219737982786328638055194841551166380070742
  484. 1830862456408830143215615868798305621624777631027360073932308960298638721844882415376568037018311468574911236119493987961697537083332678093155767086551458850802273455518082340041588350289277978742798267600438101340938164547696613519382665852289489057582
  485. 6081993431818981610368557730016741028788428895802709791839293161518472117281566274665614790204303991532531657886660360320752062106991182851058901854890188646018793870069788307915404985116486972348807121624219251338941622123014909472353316708813757365502
  486. 20203944854079880505343426672268876377871496873453431175872006445560749420447522582239349694370990213138907671739141115492019374083916483062221762844578485185734217337524646603545768596177389987941503717112544755237435661645653446691403280480551814812327
  487. 67116052038322905512822027230377902341491425851026262912901043288534436011928736411320166077203695652800886678064546149161164514866933503497793395349063304135576719358438992971602526387685031514356760365370257097789766383860049196652850122474548437310195
  488. 222954698884027081983263720977915770455363035645131054092195486210088309839690054224437596661705123192370391739237271225365092871382773250856301504590015320993824403977214513285937725131039750241589362191391273619254707733443242749965506106854594490388307
  489. 740639478110001616567495351142471088117196924689961269101510465212436887572391915556018681692523653293776028780883774465511726061969748913714585241368661851635305596597832161879566645247934179490801587201682764369091605931296813514438785971708421770788451
  490. 2460351090516327978682117740871712753465428430720894714992913994162141596648121166946104212495036458710306879400797028219354338079646770304163492743254093931470056094166530957020415189163078685956844199406766975099971246454054931111287872281612016369710754
  491. 8173109410872949798368229613244454145565523752114646609342974530297836042794050175381966816259055367554792889676706246542473700984952665677572633353028304319002122095563720860226716377886455116395584517046632851276832980137780187170192056185188975220411577
  492. 27150481774567150556084281280798027227703504115793848605521735965773074616541081657705303240537666169751731360504417098037464497456149606421020975808233131108385019004575283454381536836822710126865036372208016023461218233019693753185178398302170003256262130
  493. 90191948196661907375074320053433940599220930392705457326340167594970274838830826639432978024840209514753492124433901253234911579226828068028944506202765199177208327769779969341975660692947615772665345753130008299084457367256330789408992254621764353997013269
  494. 299611166647116766039673311716347770714005214650039199919079528497802674293176582220341700108022622978546410611496269784263100310368675539488156573694412120953583064158859532812636589500894666547368952517096678312524039676001619947648398773182935326399564034
  495. 995286752027036637489766966693538693459480165891709468253870816220244151021131906684859579787948086872067987969898508675191314822760484719192743007245141344909957682612422751702825236595035201090707505794338367665354646890514821959421992425576172960130781684
  496. 3306271024027804442727486160472854955639972811237731770301508440908947780792892396770222859201040487989127962817368942328438145497657901145716353604758650052385011135110439089441906531672428400201759650319903830987546359289277537664897419361655490355745569008
  497. 10983194604029973034011368117395839002918772988581139418098437613861938694896443204204534720295850724698513699721997661215018971856609418509145282040362174989084151889976329924213702478355600145644316491618507585012371890843672308644219687850213135150638854575
  498. 36485382726742446390693441456110480908500230393504325082417584497069577919706399983437969621190357317596015589039427072578969519084435018117307328391873562471917556704264107162358094279932729551117767502415111819691214151310255571585787593035195895613824698071
  499. 121201817932683812646882817687805622507746446849720374587338653041001334555998144315685592124657896298013605113031184380471509732471332397898878367318432482582308895766789693590342150556465517510197643737506769654890329005263436684650871881154315708276294879518
  500. 402623724142005287777609826638498153210657403737755642926911482743034900171795966734243010200606648304735673941366978042889690479056718008112677330309259336072771725580347469938459992240488269079151078682601535283926814087597122636577759743738066876768331981573
复制代码
毋因群疑而阻独见  毋任己意而废人言
毋私小惠而伤大体  毋借公论以快私情
发表于 4 天前 | 显示全部楼层
使用我上面的思路可以有下面的代码(我的输出是第一项是1,和OEIS保持一致),主要计算原则就是对于上界,总是向上舍入,对于下界,总是向下舍入。
  1. #include <gmpxx.h>

  2. #include <cstdlib>
  3. #include <iostream>
  4. #include <sstream>
  5. #include <stdexcept>
  6. #include <string>

  7. namespace {

  8. struct Options {
  9.   unsigned long keep_digits = 1000;
  10.   unsigned long steps = 20;
  11.   bool verbose = false;
  12. };

  13. struct DecimalState {
  14.   mpz_class len10;
  15.   unsigned long kept = 1;
  16.   mpz_class prefix_lo;
  17.   mpz_class prefix_hi_exclusive;
  18. };

  19. // Directed integer bound mant * 2^shift.
  20. // For lower bounds, truncation always rounds mantissa downward.
  21. // For upper bounds / exclusive upper bounds, truncation always rounds upward.
  22. struct BinBound {
  23.   mpz_class mant;
  24.   mpz_class shift;
  25. };

  26. [[noreturn]] void Fail(const std::string& message) {
  27.   throw std::runtime_error(message);
  28. }

  29. unsigned long BitLen(const mpz_class& x) {
  30.   if (x <= 0) {
  31.     return 0;
  32.   }
  33.   return mpz_sizeinbase(x.get_mpz_t(), 2);
  34. }

  35. mpz_class Pow10(unsigned long n) {
  36.   mpz_class out = 1;
  37.   mpz_ui_pow_ui(out.get_mpz_t(), 10, n);
  38.   return out;
  39. }

  40. std::string BinaryStringFixed(const mpz_class& x, unsigned long width) {
  41.   std::string s = x.get_str(2);
  42.   if (s.size() > width) {
  43.     Fail("binary width overflow while formatting prefix");
  44.   }
  45.   if (s.size() < width) {
  46.     s.insert(s.begin(), width - s.size(), '0');
  47.   }
  48.   return s;
  49. }

  50. mpz_class DecimalFromBitString(const std::string& bits) {
  51.   return mpz_class(bits, 10);
  52. }

  53. mpz_class CeilShiftRight(const mpz_class& x, unsigned long bits) {
  54.   if (bits == 0) {
  55.     return x;
  56.   }
  57.   mpz_class add = (mpz_class(1) << bits) - 1;
  58.   return (x + add) >> bits;
  59. }

  60. void TruncateDown(BinBound& v, unsigned long keep_bits) {
  61.   if (v.mant <= 0) {
  62.     Fail("invalid lower binary bound");
  63.   }
  64.   unsigned long bits = BitLen(v.mant);
  65.   if (bits <= keep_bits) {
  66.     return;
  67.   }
  68.   unsigned long drop = bits - keep_bits;
  69.   v.mant >>= drop;
  70.   v.shift += drop;
  71. }

  72. void TruncateUp(BinBound& v, unsigned long keep_bits) {
  73.   if (v.mant <= 0) {
  74.     Fail("invalid upper binary bound");
  75.   }
  76.   unsigned long bits = BitLen(v.mant);
  77.   if (bits <= keep_bits) {
  78.     return;
  79.   }
  80.   unsigned long drop = bits - keep_bits;
  81.   v.mant = CeilShiftRight(v.mant, drop);
  82.   v.shift += drop;
  83. }

  84. BinBound ExactIntegerDown(const mpz_class& n, unsigned long keep_bits) {
  85.   if (n <= 0) {
  86.     Fail("exact lower bound requires a positive integer");
  87.   }
  88.   BinBound out{n, 0};
  89.   TruncateDown(out, keep_bits);
  90.   return out;
  91. }

  92. BinBound ExactIntegerUp(const mpz_class& n, unsigned long keep_bits) {
  93.   if (n <= 0) {
  94.     Fail("exact upper bound requires a positive integer");
  95.   }
  96.   BinBound out{n, 0};
  97.   TruncateUp(out, keep_bits);
  98.   return out;
  99. }

  100. BinBound MultiplyDown(const BinBound& a, const BinBound& b,
  101.                       unsigned long keep_bits) {
  102.   BinBound out;
  103.   out.mant = a.mant * b.mant;
  104.   out.shift = a.shift + b.shift;
  105.   TruncateDown(out, keep_bits);
  106.   return out;
  107. }

  108. BinBound MultiplyUp(const BinBound& a, const BinBound& b,
  109.                     unsigned long keep_bits) {
  110.   BinBound out;
  111.   out.mant = a.mant * b.mant;
  112.   out.shift = a.shift + b.shift;
  113.   TruncateUp(out, keep_bits);
  114.   return out;
  115. }

  116. BinBound PowSmallBaseDown(unsigned long base, const mpz_class& exp,
  117.                           unsigned long keep_bits) {
  118.   BinBound result = ExactIntegerDown(1, keep_bits);
  119.   BinBound cur = ExactIntegerDown(base, keep_bits);

  120.   mpz_class e = exp;
  121.   while (e > 0) {
  122.     if (mpz_odd_p(e.get_mpz_t())) {
  123.       result = MultiplyDown(result, cur, keep_bits);
  124.     }
  125.     e >>= 1;
  126.     if (e > 0) {
  127.       cur = MultiplyDown(cur, cur, keep_bits);
  128.     }
  129.   }
  130.   return result;
  131. }

  132. BinBound PowSmallBaseUp(unsigned long base, const mpz_class& exp,
  133.                         unsigned long keep_bits) {
  134.   BinBound result = ExactIntegerUp(1, keep_bits);
  135.   BinBound cur = ExactIntegerUp(base, keep_bits);

  136.   mpz_class e = exp;
  137.   while (e > 0) {
  138.     if (mpz_odd_p(e.get_mpz_t())) {
  139.       result = MultiplyUp(result, cur, keep_bits);
  140.     }
  141.     e >>= 1;
  142.     if (e > 0) {
  143.       cur = MultiplyUp(cur, cur, keep_bits);
  144.     }
  145.   }
  146.   return result;
  147. }

  148. mpz_class LowerBitLength(const BinBound& v) {
  149.   if (v.mant <= 0) {
  150.     Fail("invalid lower bound for bit length");
  151.   }
  152.   return v.shift + BitLen(v.mant);
  153. }

  154. mpz_class UpperLastBitLength(const BinBound& upper_exclusive) {
  155.   if (upper_exclusive.mant <= 0) {
  156.     Fail("invalid upper bound for bit length");
  157.   }
  158.   if (upper_exclusive.shift == 0) {
  159.     return BitLen(upper_exclusive.mant - 1);
  160.   }
  161.   if (upper_exclusive.mant == 1) {
  162.     return upper_exclusive.shift;
  163.   }
  164.   return upper_exclusive.shift + BitLen(upper_exclusive.mant);
  165. }

  166. mpz_class ShiftedLowerQuotient(const BinBound& lower, const mpz_class& drop) {
  167.   if (drop < 0) {
  168.     Fail("negative drop for lower quotient");
  169.   }
  170.   if (lower.shift >= drop) {
  171.     mpz_class delta = lower.shift - drop;
  172.     if (!delta.fits_ulong_p()) {
  173.       Fail("left shift too large while extracting lower prefix bits");
  174.     }
  175.     return lower.mant << delta.get_ui();
  176.   }
  177.   mpz_class delta = drop - lower.shift;
  178.   if (!delta.fits_ulong_p()) {
  179.     return 0;
  180.   }
  181.   return lower.mant >> delta.get_ui();
  182. }

  183. mpz_class ShiftedUpperExclusiveQuotient(const BinBound& upper_exclusive,
  184.                                         const mpz_class& drop) {
  185.   if (drop < 0) {
  186.     Fail("negative drop for upper quotient");
  187.   }
  188.   if (upper_exclusive.shift >= drop) {
  189.     mpz_class delta = upper_exclusive.shift - drop;
  190.     if (!delta.fits_ulong_p()) {
  191.       Fail("left shift too large while extracting upper prefix bits");
  192.     }
  193.     return upper_exclusive.mant << delta.get_ui();
  194.   }
  195.   mpz_class delta = drop - upper_exclusive.shift;
  196.   if (!delta.fits_ulong_p()) {
  197.     return 1;
  198.   }
  199.   return CeilShiftRight(upper_exclusive.mant, delta.get_ui());
  200. }

  201. mpz_class ClampKeptDigits(const mpz_class& len10, unsigned long keep_digits) {
  202.   if (len10 <= keep_digits) {
  203.     return len10;
  204.   }
  205.   return mpz_class(keep_digits);
  206. }

  207. unsigned long AsUnsignedLongChecked(const mpz_class& x, const std::string& what) {
  208.   if (!x.fits_ulong_p()) {
  209.     Fail(what + " does not fit into unsigned long");
  210.   }
  211.   return x.get_ui();
  212. }

  213. void PrintState(unsigned long index, const DecimalState& s) {
  214.   std::cout << "n=" << index
  215.             << " len=" << s.len10.get_str()
  216.             << " kept=" << s.kept
  217.             << " prefix_lo=" << s.prefix_lo.get_str()
  218.             << " prefix_hi_exclusive=" << s.prefix_hi_exclusive.get_str()
  219.             << "\n";
  220. }

  221. DecimalState InitialState() {
  222.   return DecimalState{1, 1, 2, 3};
  223. }

  224. DecimalState NextState(const DecimalState& cur, unsigned long keep_digits,
  225.                        bool verbose) {
  226.   if (cur.prefix_hi_exclusive <= cur.prefix_lo) {
  227.     Fail("invalid decimal interval");
  228.   }

  229.   mpz_class kept_mpz = ClampKeptDigits(cur.len10, keep_digits);
  230.   unsigned long kept = AsUnsignedLongChecked(kept_mpz, "kept digits");

  231.   mpz_class e10 = cur.len10 - kept_mpz;
  232.   const unsigned long keep_bits = keep_digits + 32;
  233.   BinBound pow5_lo = PowSmallBaseDown(5, e10, keep_bits);
  234.   BinBound pow5_hi = PowSmallBaseUp(5, e10, keep_bits);
  235.   BinBound prefix_lo = ExactIntegerDown(cur.prefix_lo, keep_bits);
  236.   BinBound prefix_hi = ExactIntegerUp(cur.prefix_hi_exclusive, keep_bits);

  237.   BinBound x_lo = MultiplyDown(prefix_lo, pow5_lo, keep_bits);
  238.   x_lo.shift += e10;
  239.   BinBound x_hi_exclusive = MultiplyUp(prefix_hi, pow5_hi, keep_bits);
  240.   x_hi_exclusive.shift += e10;

  241.   mpz_class next_len_lo = LowerBitLength(x_lo);
  242.   mpz_class next_len_hi = UpperLastBitLength(x_hi_exclusive);

  243.   if (next_len_lo != next_len_hi) {
  244.     std::ostringstream oss;
  245.     oss << "precision exhausted: next length is only known to be in ["
  246.         << next_len_lo.get_str() << ", " << next_len_hi.get_str() << "]";
  247.     Fail(oss.str());
  248.   }

  249.   mpz_class next_len = next_len_lo;
  250.   mpz_class next_kept_mpz = ClampKeptDigits(next_len, keep_digits);
  251.   unsigned long next_kept =
  252.       AsUnsignedLongChecked(next_kept_mpz, "next kept digits");

  253.   mpz_class drop = next_len - next_kept_mpz;
  254.   mpz_class next_prefix_lo_bits = ShiftedLowerQuotient(x_lo, drop);
  255.   mpz_class next_prefix_hi_bits_exclusive =
  256.       ShiftedUpperExclusiveQuotient(x_hi_exclusive, drop);

  257.   mpz_class upper_limit = mpz_class(1) << next_kept;
  258.   if (next_prefix_hi_bits_exclusive > upper_limit) {
  259.     next_prefix_hi_bits_exclusive = upper_limit;
  260.   }

  261.   std::string lo_bits = BinaryStringFixed(next_prefix_lo_bits, next_kept);
  262.   mpz_class next_prefix_lo = DecimalFromBitString(lo_bits);

  263.   mpz_class next_prefix_hi_exclusive;
  264.   if (next_prefix_hi_bits_exclusive == upper_limit) {
  265.     next_prefix_hi_exclusive = Pow10(next_kept);
  266.   } else {
  267.     std::string hi_bits =
  268.         BinaryStringFixed(next_prefix_hi_bits_exclusive, next_kept);
  269.     next_prefix_hi_exclusive = DecimalFromBitString(hi_bits);
  270.   }

  271.   if (verbose) {
  272.     std::cout << "  e10=" << e10.get_str()
  273.               << " next_len_lo=" << next_len_lo.get_str()
  274.               << " next_len_hi=" << next_len_hi.get_str()
  275.               << " next_prefix_lo_bits=" << next_prefix_lo_bits.get_str(2)
  276.               << " next_prefix_hi_bits_exclusive="
  277.               << next_prefix_hi_bits_exclusive.get_str(2) << "\n";
  278.   }

  279.   if (next_prefix_hi_exclusive <= next_prefix_lo) {
  280.     Fail("next decimal prefix interval collapsed");
  281.   }

  282.   return DecimalState{next_len, next_kept, next_prefix_lo,
  283.                       next_prefix_hi_exclusive};
  284. }

  285. Options ParseOptions(int argc, char** argv) {
  286.   Options opt;
  287.   for (int i = 1; i < argc; ++i) {
  288.     std::string arg = argv[i];
  289.     auto need_value = [&](const std::string& name) -> std::string {
  290.       if (i + 1 >= argc) {
  291.         Fail("missing value for " + name);
  292.       }
  293.       return argv[++i];
  294.     };

  295.     if (arg == "--keep-digits") {
  296.       opt.keep_digits = std::stoul(need_value(arg));
  297.     } else if (arg == "--steps") {
  298.       opt.steps = std::stoul(need_value(arg));
  299.     } else if (arg == "--verbose") {
  300.       opt.verbose = true;
  301.     } else if (arg == "--help" || arg == "-h") {
  302.       std::cout
  303.           << "Usage: bin2dec [--keep-digits M] [--steps N] [--verbose]\n";
  304.       std::exit(0);
  305.     } else {
  306.       Fail("unknown argument: " + arg);
  307.     }
  308.   }
  309.   if (opt.keep_digits == 0) {
  310.     Fail("--keep-digits must be positive");
  311.   }
  312.   if (opt.steps == 0) {
  313.     Fail("--steps must be positive");
  314.   }
  315.   return opt;
  316. }

  317. }  // namespace

  318. int main(int argc, char** argv) {
  319.   try {
  320.     const Options opt = ParseOptions(argc, argv);
  321.     DecimalState state = InitialState();
  322.     PrintState(1, state);

  323.     for (unsigned long i = 2; i <= opt.steps; ++i) {
  324.       state = NextState(state, opt.keep_digits, opt.verbose);
  325.       PrintState(i, state);
  326.     }
  327.     return 0;
  328.   } catch (const std::exception& ex) {
  329.     std::cerr << "error: " << ex.what() << "\n";
  330.     return 1;
  331.   }
  332. }
复制代码

比如输入精度为1000时,可以计算到第602项。
毋因群疑而阻独见  毋任己意而废人言
毋私小惠而伤大体  毋借公论以快私情
发表于 4 天前 | 显示全部楼层
我把前602项提交到OEIS了,计算结果验证fans和l4m2的至少最后一项都没有错

点评

6#——1, 2, 7, 14, 44, 158, 535, 1821, ...来个30项开开眼。  发表于 前天 03:39
不过的确你的代码写的比较清晰  发表于 4 天前
是挺快的,只是没有必要算那么多项了。我这边也是AI写的代码,就是看上去一大坨,有点复杂了  发表于 4 天前
real 2m8.014s user 2m7.236s sys 0m0.056s  发表于 4 天前
我算到2368其实也没花多久,并且很多东西是重复计算的(本来上下界分开算,叫AI合并到一起)  发表于 4 天前

评分

参与人数 1威望 +8 金币 +8 贡献 +8 经验 +8 鲜花 +8 收起 理由
王守恩 + 8 + 8 + 8 + 8 + 8 神也不过如此!!!

查看全部评分

毋因群疑而阻独见  毋任己意而废人言
毋私小惠而伤大体  毋借公论以快私情
发表于 4 天前 | 显示全部楼层
毋因群疑而阻独见  毋任己意而废人言
毋私小惠而伤大体  毋借公论以快私情
回复 支持 0 反对 2

使用道具 举报

您需要登录后才可以回帖 登录 | 欢迎注册

本版积分规则

小黑屋|手机版|数学研发网 ( 苏ICP备07505100号 )

GMT+8, 2026-4-18 18:10 , Processed in 0.032165 second(s), 15 queries .

Powered by Discuz! X3.5

© 2001-2026 Discuz! Team.

快速回复 返回顶部 返回列表