• <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年8月>
            25262728293031
            1234567
            891011121314
            15161718192021
            22232425262728
            2930311234

            導航

            統計

            常用鏈接

            留言簿(2)

            隨筆分類(65)

            隨筆檔案(65)

            文章檔案(2)

            ACM

            搜索

            積分與排名

            最新隨筆

            最新評論

            閱讀排行榜

            精品久久久中文字幕人妻 | 97久久精品无码一区二区| 色婷婷久久综合中文久久蜜桃av| 国产亚洲欧美精品久久久| 日本高清无卡码一区二区久久| 亚洲中文字幕无码久久2020| 久久国产精品偷99| 久久久久99精品成人片试看 | 老司机午夜网站国内精品久久久久久久久 | 91久久精品电影| 国产成人久久精品一区二区三区| 色综合色天天久久婷婷基地| 国产成人精品久久免费动漫 | 国产Av激情久久无码天堂| 久久精品国产99久久香蕉| 蜜臀av性久久久久蜜臀aⅴ| 久久精品国产欧美日韩| 精品熟女少妇a∨免费久久| 伊人热热久久原色播放www | 日产精品久久久一区二区| 国内精品久久久久久久coent| 伊人久久久AV老熟妇色| 久久亚洲av无码精品浪潮| 久久―日本道色综合久久| 色欲综合久久躁天天躁蜜桃| 97精品依人久久久大香线蕉97| 国产精品日韩深夜福利久久| 久久99久久无码毛片一区二区 | 狠狠色综合久久久久尤物| 久久国产免费观看精品3| 久久人人爽人人爽人人片AV东京热| 久久精品无码免费不卡| 国产成人久久久精品二区三区| 国产精品9999久久久久| 国内精品久久久久影院免费| 国产免费久久久久久无码| 久久婷婷久久一区二区三区| 亚洲精品国产成人99久久| 久久久中文字幕| 天天久久狠狠色综合| 久久精品国产精品亚洲下载|