• <ins id="pjuwb"></ins>
    <blockquote id="pjuwb"><pre id="pjuwb"></pre></blockquote>
    <noscript id="pjuwb"></noscript>
          <sup id="pjuwb"><pre id="pjuwb"></pre></sup>
            <dd id="pjuwb"></dd>
            <abbr id="pjuwb"></abbr>

            Ural 1044 Lucky tickets. Easy!

            注意的是這里的n位數可以以0打頭

            #include<iostream>
            using namespace std;

            void f2()
            {
                 
            int count=0;
                 
            for(int i1=0; i1<=9; i1++)
                 
            for(int i2=0; i2<=9; i2++)
                         
            if(i1==i2)count++;
                 cout
            <<count<<endl;
            }

            void f4()
            {
                 
            int count=0;
                 
            for(int i1=0; i1<=9; i1++)
                 
            for(int i2=0; i2<=9; i2++)
                 
            for(int i3=0; i3<=9; i3++)
                 
            for(int i4=0; i4<=9; i4++)
                         
            if(i1+i2==i3+i4)count++;
                 cout
            <<count<<endl;
            }

            void f6()
            {
                 
            int count=0;
                 
            for(int i1=0; i1<=9; i1++)
                 
            for(int i2=0; i2<=9; i2++)
                 
            for(int i3=0; i3<=9; i3++)
                 
            for(int i4=0; i4<=9; i4++)
                 
            for(int i5=0; i5<=9; i5++)
                 
            for(int i6=0; i6<=9; i6++)
                         
            if(i1+i2+i3==i5+i4+i6)count++;
                 cout
            <<count<<endl;
            }

            void f8()
            {
                 
            int count=0;
                 
            for(int i1=0; i1<=9; i1++)
                 
            for(int i2=0; i2<=9; i2++)
                 
            for(int i3=0; i3<=9; i3++)
                 
            for(int i4=0; i4<=9; i4++)
                 
            for(int i5=0; i5<=9; i5++)
                 
            for(int i6=0; i6<=9; i6++)
                 
            for(int i7=0; i7<=9; i7++)
                 
            for(int i8=0; i8<=9; i8++)
                         
            if(i1+i2+i3+i4==i5+i7+i6+i8)count++;
                 cout
            <<count<<endl;
            }

            int main()
            {
                
            int n;
                cin
            >>n;
                
            if(n==2)f2();
                
            else if(n==4)f4();
                
            else if(n==6)f6();
                
            else if(n==8)f8();
                
                system(
            "pause");
                
            return 0;
            }

            posted on 2010-06-23 23:36 田兵 閱讀(275) 評論(0)  編輯 收藏 引用 所屬分類: URAL

            <2010年6月>
            303112345
            6789101112
            13141516171819
            20212223242526
            27282930123
            45678910

            導航

            統計

            常用鏈接

            留言簿(2)

            隨筆分類(65)

            隨筆檔案(65)

            文章檔案(2)

            ACM

            搜索

            積分與排名

            最新隨筆

            最新評論

            閱讀排行榜

            无遮挡粉嫩小泬久久久久久久 | 亚洲一区二区三区日本久久九| 欧美熟妇另类久久久久久不卡| 久久精品aⅴ无码中文字字幕不卡| 狠狠色婷婷综合天天久久丁香| 国产精品99久久精品爆乳| 久久综合伊人77777麻豆| 久久综合狠狠综合久久| AA级片免费看视频久久| 无码国内精品久久人妻蜜桃| 9191精品国产免费久久| 久久成人国产精品| 欧美与黑人午夜性猛交久久久| 久久久久久人妻无码| 久久精品18| 国产精品一区二区久久| 免费久久人人爽人人爽av| 久久九九青青国产精品| 久久久婷婷五月亚洲97号色| 久久精品亚洲精品国产欧美| 久久久久无码精品国产不卡| 日本国产精品久久| 91精品久久久久久无码| 国产精品久久影院| 国内精品伊人久久久久777| 久久精品一区二区影院| 欧美精品一本久久男人的天堂| 久久精品一本到99热免费| 久久精品综合网| 亚洲国产香蕉人人爽成AV片久久 | AAA级久久久精品无码区| 久久99热只有频精品8| 亚洲精品无码久久久久| 精品一二三区久久aaa片| 狠狠色丁香久久婷婷综合_中| 色综合久久中文字幕综合网| 久久se这里只有精品| 狠狠久久综合伊人不卡| 国产精品九九久久免费视频| 国产福利电影一区二区三区久久久久成人精品综合 | 欧美精品一区二区精品久久|