Coder Social home page Coder Social logo

caipiao_test's Introduction

caipiao_test

彩票问题 http://www.ruanyifeng.com/blog/2018/04/lottery-mathematics.html

彩票解决方法详见阮老师博客

方法:

1.使用caipiao.js的gen函数产生全部4个号码的组合 C(48,4) 组,6个号码的组合 C(48,6) 组。

2.每次从6个号码的组合中选取 12972 个号码, 遍历 4个号码 的组合是否全部包含。

more:

选取组合的时候可以考虑一些优化方案,减少一些计算量。例如:

    123 124 125 126 127 

    134 135 136 137 

    145 146 147 

    156 157 

    167 
    234 235 236 237 

    245 246 247 

    256 257 

    267 

    345 346 347 

    356 357 

    367 

    456 457 

    467 

    567

每次从 123 124 125 126 127 这些组合中选取一个,再从其他组合选取剩下的。。。

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.