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

            搜索

            積分與排名

            最新隨筆

            最新評論

            閱讀排行榜

            51久久夜色精品国产| 亚洲AV无码久久精品色欲| 国产精品va久久久久久久| 久久免费视频一区| 久久久久人妻一区精品色| 久久国产影院| av无码久久久久久不卡网站| 日产久久强奸免费的看| 久久无码人妻一区二区三区| 久久影院亚洲一区| 精品久久777| 人妻精品久久无码专区精东影业 | 久久久91精品国产一区二区三区| 精品久久人人妻人人做精品| 久久国产欧美日韩精品| 久久久久久久久久久久久久| 久久久WWW免费人成精品| 7777久久亚洲中文字幕| 久久久久亚洲Av无码专| 亚洲精品无码专区久久久 | 99久久夜色精品国产网站| 国产亚洲美女精品久久久2020| 精品久久久久久无码中文野结衣| 俺来也俺去啦久久综合网| 少妇高潮惨叫久久久久久| 精品久久久久久国产| 伊人久久精品影院| 性高朝久久久久久久久久| 久久综合狠狠综合久久97色| 国产99久久久国产精品~~牛| 久久精品人人做人人爽电影| 韩国免费A级毛片久久| 国产V综合V亚洲欧美久久| 久久久久久国产精品无码超碰| 日韩精品久久无码中文字幕| 人妻少妇久久中文字幕一区二区| 欧美午夜精品久久久久免费视| 亚洲AV无码久久| 69SEX久久精品国产麻豆| 久久午夜电影网| 久久精品免费网站网|