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

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

            導航

            統計

            常用鏈接

            留言簿(2)

            隨筆分類(65)

            隨筆檔案(65)

            文章檔案(2)

            ACM

            搜索

            積分與排名

            最新隨筆

            最新評論

            閱讀排行榜

            狠狠综合久久AV一区二区三区| 亚洲精品蜜桃久久久久久| 久久99精品久久只有精品| 国产精品久久久久影院色| 97超级碰碰碰碰久久久久| 久久性精品| 久久ww精品w免费人成| 亚洲国产精品久久| 亚洲国产婷婷香蕉久久久久久| 亚洲精品无码久久一线| 久久国产精品成人免费| 伊人久久精品无码av一区| 国产精品久久久久久影院 | 久久久久久久97| 久久精品国产清自在天天线| 日产精品久久久久久久| 久久久亚洲精品蜜桃臀| 久久亚洲国产中v天仙www| 日韩欧美亚洲综合久久| 9999国产精品欧美久久久久久| 久久精品国产亚洲AV蜜臀色欲| 久久精品国产亚洲Aⅴ香蕉 | 深夜久久AAAAA级毛片免费看| 久久夜色精品国产噜噜亚洲AV| 国产午夜电影久久| 99久久99这里只有免费费精品| 国产aⅴ激情无码久久| 一级做a爰片久久毛片看看 | 无码人妻久久一区二区三区蜜桃 | 国内精品人妻无码久久久影院导航| 97超级碰碰碰碰久久久久| 国产精品久久久久影院色| 久久精品人人做人人爽97 | 中文字幕无码av激情不卡久久| 久久国产成人亚洲精品影院| 久久99毛片免费观看不卡| 成人综合伊人五月婷久久| 99999久久久久久亚洲| 国内精品久久国产大陆| 无码人妻精品一区二区三区久久 | 久久人人妻人人爽人人爽|