Coder Social home page Coder Social logo

lottery's Introduction

笔戈公开抽奖算法

算法文件

中奖号码计算办法

  • 开奖日收盘时的上证指数 × 收盘时的深证成指 × 10000 = 12位数。(指数以证交所公布数字为准);
  • 将此12位数的数字倒序排列后(如首位是0,则直接抹去),参加本次活动的人数(每个抽奖号为一个人数),得到的余数加1即为本次活动的第一个获奖号码。
  • 如果当天需要开多个奖,则用上一个中奖号码 + (D * N) ,D为活动截止日期,如当天为12月23号,则D为1223,, N为 1,2,3,4。。。得出当天其他获奖号码。
  • 如果抽奖号码超过了总参加人数,则将抽奖号码减去参加人数得到新的抽奖号码。

例如

  1. 2014-12-18日上证指数 3076.49,深证指数 10591.54。活动参与人数 65302
  2. 基数:3076.49 * 10591.54 * 10000 = 325847668946
  3. 反转的结果: 649866748523
  4. 第一个中奖号码: (649866748523 % 65302) +1 = 51500
  5. 更多中奖号码:
  • 51500 + 1223 * 1 = 52723
  • 51500 + 1223 * 2 = 53946
  • 51500 + 1223 * 3 = 55169
  • 。。。

注意事项

  • 此活动仅限人类参加,机器人或外星生物参加取消资格;
  • 开奖期间请保持手机畅通,开奖后超过7天无法联系视为主动放弃
  • 任何问题去笔戈科技微博反馈

lottery's People

Contributors

shanelau avatar

Watchers

 avatar  avatar  avatar

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.