[Recommended] computing function of the number of color notes in time

Source: Internet
Author: User
Provides a variety of official and user-released code examples. For code reference, you are welcome to exchange and learn [recommended] computing functions
When color development, when color note number calculation, when color platform, when color source code php, when color source code download
// This code is not perfect. It may be poor. Please give me some advice!
// Author Zeng Qq839024615 can communicate with me
// Author's website http://www.yun8888.net


// Gameplay
'00': 'First three direct select ',
'01': 'First three direct select ',
'10': 'Next three direct select ',
'11': 'Next three direct select ',
'22': 'select the first three groups-group 3 ',
'21': 'First three groups-mixed input ',
'29': 'select the first three groups-group 6 ',
'31': 'select the last three groups-hybrid inputting ',
'41 ': 'First two stars ',
'51': 'Second after five stars ',
'32': 'select the last three groups-group 3 ',
'39 ': 'select the last three groups-group 6 ',
'44': 'First two stars ',
'123': 'First two stars-group select ',
'54 ': 'Second after five stars ',
'000000': 'Five stars after the second-group select ',
'60': 'size single-dual ',
'77 ': 'the first three are not positioned ',
'123': 'The Last three are not positioned ',
'80': 'positioning id'

// Calculate the number of notebooks
// $ Wanfa = gameplay
// Num = the bet data is directly selected for the duplex group 12345, 123,123,123, or
Function get_zs ($ wanfa, $ num ){
$ Num = trim ($ num );
If ($ wanfa = "00" or $ wanfa = "10" or $ wanfa = "44" or $ wanfa = "54 "){
$ Arr = explode (",", $ num );
$ Zs = "1 ";
For ($ I = 0; $ I $ Zs = $ zs * strlen ($ arr [$ I]);
}
Return $ zs;
} Elseif ($ wanfa = "0 w" or $ wanfa = "1 w" or $ wanfa = "4 w" or $ wanfa = "5 w "){
Return 1;
} Elseif ($ wanfa = "22" or $ wanfa = "32 "){
$ N = strlen ($ num );
Switch ($ n ){
Case 3:
Return 2; break;
Case 3:
Return 6; break;
Case 4:
Return 12; break;
Case 5:
Return 20; break;
Case 6:
Return 30; break;
Case 7:
Return 42; break;
Case 8:
Return 56; break;
Case 9:
Return 72; break;
Case 10:
Return 90; break;
Default:
Return "error ";
}
// Triplicate computing
} Elseif ($ wanfa = "29" or $ wanfa = "39" or $ wanfa = "77" or $ wanfa = "771 "){
$ N = strlen ($ num );
Return ($ n * ($ N-1) * ($ N-2)/6;
// Second-and second-level complex computing
} Elseif ($ wanfa = "410" or $ wanfa = "510 "){
$ N = strlen ($ num );
Return ($ n * ($ N-1)/2;
} Elseif ($ wanfa = "80 "){
$ Arr = explode (",", $ num );
$ Zs = "0 ";
For ($ I = 0; $ I $ Zs = $ zs + strlen ($ arr [$ I]);
}
Return $ zs;
} Elseif ($ wanfa = "60 "){
$ Arr = explode (",", $ num );
$ Zs = "1 ";
For ($ I = 0; $ I $ Zs = $ zs * strlen ($ arr [$ I])/3;
}
Return $ zs;
} Else {
Return "none! ";
}

}


// This code is not perfect. It may be poor. Please give me some advice!
// Author Zeng Qq839024615 can communicate with me
// Author's website http://www.yun8888.net

AD: truly free, domain name + VM + enterprise mailbox = 0 RMB

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.