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

            superman

            聚精會神搞建設(shè) 一心一意謀發(fā)展
            posts - 190, comments - 17, trackbacks - 0, articles - 0
               :: 首頁 :: 新隨筆 :: 聯(lián)系 :: 聚合  :: 管理

            Section 2.2 - Preface Numbering

            Posted on 2009-03-28 17:10 superman 閱讀(105) 評論(0)  編輯 收藏 引用 所屬分類: USACO
             1 #include <iostream>
             2 
             3 using namespace std;
             4 
             5 int main()
             6 {
             7     freopen("preface.in""r", stdin);
             8     freopen("preface.out""w", stdout);
             9 
            10     int n;
            11     cin >> n;
            12 
            13     int I, V, X, L, C, D, M;
            14     I = V = X = L = C = D = M = 0;
            15 
            16     while (n)
            17     {
            18         int c = n--;
            19         while (c)
            20         {
            21             if (c >= 1000) { c -= 1000, M++     ; continue; }
            22             if (c >= 900 ) { c -= 900 , C++, M++continue; }
            23             if (c >= 500 ) { c -= 500 , D++     ; continue; }
            24             if (c >= 400 ) { c -= 400 , C++, D++continue; }
            25             if (c >= 100 ) { c -= 100 , C++     ; continue; }
            26             if (c >= 90  ) { c -= 90  , X++, C++continue; }
            27             if (c >= 50  ) { c -= 50  , L++     ; continue; }
            28             if (c >= 40  ) { c -= 40  , X++, L++continue; }
            29             if (c >= 10  ) { c -= 10  , X++     ; continue; }
            30             if (c >= 9   ) { c -= 9   , I++, X++continue; }
            31             if (c >= 5   ) { c -= 5   , V++     ; continue; }
            32             if (c >= 4   ) { c -= 4   , I++, V++continue; }
            33             if (c >= 1   ) { c -= 1   , I++     ; continue; }
            34         }
            35     }
            36 
            37     if (I) cout << 'I' << ' ' << I << endl;
            38     if (V) cout << 'V' << ' ' << V << endl;
            39     if (X) cout << 'X' << ' ' << X << endl;
            40     if (L) cout << 'L' << ' ' << L << endl;
            41     if (C) cout << 'C' << ' ' << C << endl;
            42     if (D) cout << 'D' << ' ' << D << endl;
            43     if (M) cout << 'M' << ' ' << M << endl;
            44 
            45     return 0;
            46 }
            47 
            久久久久黑人强伦姧人妻| 久久久免费观成人影院| 久久国产色AV免费观看| 狠狠色丁香久久综合五月| 久久久亚洲精品蜜桃臀| 亚洲精品乱码久久久久久中文字幕| 久久人妻AV中文字幕| 欧美777精品久久久久网| 国内精品久久久久影院老司| 狠狠色丁香婷婷综合久久来 | 久久精品国产久精国产思思 | 亚洲精品高清久久| 久久精品人妻中文系列| 国产免费久久久久久无码| 国产精品一区二区久久国产| 日批日出水久久亚洲精品tv| 久久精品国产第一区二区三区 | 久久综合狠狠综合久久| 日本久久中文字幕| 中文字幕乱码人妻无码久久| 久久精品国产亚洲精品2020 | 久久精品国产乱子伦| 嫩草影院久久国产精品| 久久国产乱子伦免费精品| 亚洲精品高清国产一久久| 久久超碰97人人做人人爱| 久久婷婷色综合一区二区| 色婷婷综合久久久久中文字幕| 香港aa三级久久三级| 97久久天天综合色天天综合色hd| 久久精品国产亚洲AV忘忧草18| 欧美午夜精品久久久久久浪潮| 国产成人99久久亚洲综合精品| 久久精品中文字幕久久| 久久av无码专区亚洲av桃花岛| 亚洲色欲久久久综合网东京热| 老男人久久青草av高清| 国内精品久久国产| 久久永久免费人妻精品下载| 99久久精品日本一区二区免费| 久久国产精品99精品国产|