In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-04 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/03 Report--
This article mainly introduces how to implement the php Joseph problem solving algorithm for the execution of prisoners, the article introduces in great detail, has a certain reference value, interested friends must read it!
The specific analysis is as follows:
In ancient times, a judge wanted to sentence IV prisoners to death. He had an absurd law that made prisoners stand in a circle. From the beginning of the second person, every D person was pulled out to be executed, and then D was counted, and then pulled out for execution. Until the last one can be pardoned.
Function getNum ($n quotient m) {/ / is used to initialize all the numbers in the array $a = array (); / / traverses, and stores it into the array for ($iposi1 * * i1) {/ / if the item in the array is greater than 1, continue to loop out the element / / delete the rule for ($job1 * j
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.