• <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东京热| 久久亚洲国产精品成人AV秋霞| 久久成人国产精品| 久久精品中文字幕一区| 久久久无码精品亚洲日韩按摩 | 中文无码久久精品| 久久最近最新中文字幕大全| 久久乐国产综合亚洲精品| 91精品国产高清久久久久久io | 久久精品麻豆日日躁夜夜躁| 四虎国产精品免费久久| 99久久国产综合精品成人影院| 久久综合偷偷噜噜噜色| 999久久久免费国产精品播放| 国内精品久久久久久久久电影网| 久久精品中文字幕第23页| 久久国产乱子精品免费女| 狠狠色丁香久久婷婷综合图片 | 人妻中文久久久久| 国产一区二区精品久久岳| 97久久久精品综合88久久| 久久天天躁狠狠躁夜夜不卡| 内射无码专区久久亚洲| 久久久久久国产a免费观看不卡| 久久夜色精品国产亚洲| 国产精品久久精品| 久久精品视频网| 久久精品国产精品青草app| 精品久久一区二区三区| 99热成人精品热久久669| 国产成人精品免费久久久久| 久久精品亚洲一区二区三区浴池| 国产综合久久久久| 色综合久久天天综合| 久久精品?ⅴ无码中文字幕| 久久男人中文字幕资源站|