• <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 田兵 閱讀(287) 評論(0)  編輯 收藏 引用 所屬分類: URAL

            <2010年5月>
            2526272829301
            2345678
            9101112131415
            16171819202122
            23242526272829
            303112345

            導航

            統計

            常用鏈接

            留言簿(2)

            隨筆分類(65)

            隨筆檔案(65)

            文章檔案(2)

            ACM

            搜索

            積分與排名

            最新隨筆

            最新評論

            閱讀排行榜

            久久精品一区二区三区AV| 亚洲国产天堂久久综合| 热re99久久精品国99热| 婷婷久久综合九色综合98| 日本免费久久久久久久网站| 久久国产香蕉视频| 久久久无码人妻精品无码| 久久久久无码精品国产app| 色欲久久久天天天综合网精品| 2021久久精品国产99国产精品| 久久亚洲国产欧洲精品一| 一本一本久久a久久精品综合麻豆| 久久久久久毛片免费播放| 麻豆久久久9性大片| 亚洲成人精品久久| 性高湖久久久久久久久| 久久精品视频一| 精品国产乱码久久久久久浪潮 | 久久精品国产亚洲精品| 大香伊人久久精品一区二区| 国产成人香蕉久久久久| 国产精品久久久久久久久免费| 伊人久久大香线蕉亚洲| 日韩亚洲国产综合久久久| 亚洲AⅤ优女AV综合久久久| 97久久精品人人澡人人爽 | 久久精品国内一区二区三区| 久久91精品国产91久| 热99RE久久精品这里都是精品免费| 久久久久国产一区二区三区| 欧美久久综合性欧美| 欧美精品一本久久男人的天堂| 精品精品国产自在久久高清| 久久精品aⅴ无码中文字字幕不卡 久久精品aⅴ无码中文字字幕重口 | 久久受www免费人成_看片中文 | 久久99国产乱子伦精品免费| 日本欧美久久久久免费播放网 | 国产69精品久久久久9999| 99久久成人18免费网站| 久久国产精品免费一区二区三区 | 国产午夜精品理论片久久影视|