• <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

            搜索

            積分與排名

            最新隨筆

            最新評論

            閱讀排行榜

            狠狠色丁香久久婷婷综合五月 | 99久久人妻无码精品系列| 亚洲精品视频久久久| 人妻无码久久精品| 亚洲日韩中文无码久久| 亚洲国产欧洲综合997久久| 久久久久高潮毛片免费全部播放| 久久综合综合久久综合| 国内精品久久久久影院优| 嫩草影院久久99| 久久精品亚洲乱码伦伦中文| 久久一区二区免费播放| 亚洲AV成人无码久久精品老人| 久久香蕉国产线看观看99| 91久久精品电影| 国产A三级久久精品| 99精品久久久久久久婷婷| 亚洲第一永久AV网站久久精品男人的天堂AV | 99久久免费国产精品| 久久婷婷国产剧情内射白浆| 亚洲熟妇无码另类久久久| 粉嫩小泬无遮挡久久久久久| 久久99国产精品久久99| 国产福利电影一区二区三区久久老子无码午夜伦不 | 久久永久免费人妻精品下载| 2021国内精品久久久久久影院| 天天影视色香欲综合久久| 精品综合久久久久久97| 久久亚洲AV成人无码国产 | 久久ZYZ资源站无码中文动漫| 2021精品国产综合久久| 日本三级久久网| 2020久久精品亚洲热综合一本| 久久婷婷五月综合97色| 久久青青草原精品国产软件| 亚洲AV日韩AV永久无码久久 | 97久久精品国产精品青草| 久久高清一级毛片| 精品久久久噜噜噜久久久| 久久亚洲电影| 国产精品一久久香蕉产线看|