<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                ??碼云GVP開源項目 12k star Uniapp+ElementUI 功能強大 支持多語言、二開方便! 廣告
                //原題目:0出發,回到0成功,到達N(North)則失敗:;求成功和失敗的概率 之比例; ``` // // main.cpp // leftOrRight210801 //南極0出發,回到0南極則成功;到達N北極掉落 // Created by terry on 2021/8/19. //Start from the Zero(South),go back Zero is Success, and go Fail N(North) is Fail! #include #define times01 1000000 //電腦快可以設置更多,比如百億次實驗 //#define NN 3 **int** NN1=500; **int** main(**int** argc, **const** **char** \* argv\[\]) { // insert code here... // **int** pIn=0; **int** zeroSuccess=0; //Success Come bak Zero **int** NorthFail=0; //Fail to the North WuQiong **bool** tmpbool; //Bool 0 or 1 **for** (**unsigned** **long** **int** ii=0;ii<times01;++ii) {//for110ii pIn=0; //初始化 ++pIn; //激活 右Right Jump one Time(s); // **do** { //do220 Start110: tmpbool=rand()%2; **if**(1\==tmpbool) {//if220 //1== Right Jump; ++pIn; **if**(pIn>=NN1) { NorthFail++; **goto** North880Fail; } **else** {**goto** Start110;} //這個 else 省略 的話,不影響邏輯 }//if220 **else** **if** (0\==tmpbool) {//if330elseIf \--pIn; **if**(pIn<1) {++zeroSuccess; **goto** Zero90ZeroSuccess;} **else** {**goto** Start110;} //這個 else 省略 也不影響邏輯 }//if330elseIf **else** { std::cout<<"Error990!";} //這個 else 是冗余的 (多余的) } **while** (pIn>0 && pIn<=NN1); //do220 //這個條件 也是 冗余的 // North880Fail:; Zero90ZeroSuccess:; }//for110ii // std::cout<<"When the Num of Cells總格子數:NN="<< NN1<<":"<<std::endl; std::cout<<"Run:"<< times01<<" times experiments!"<<std::endl; std::cout<<"回到0的次數Nums go home to Zero Success:"<<zeroSuccess<<std::endl; std::cout<<"Fail to N,掉落于N(North):"<<NorthFail<<std::endl; **return** 0; //這句 冗余, 是固定格式… }//main() ```
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看