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

            聚精會神搞建設 一心一意謀發展
            posts - 190, comments - 17, trackbacks - 0, articles - 0
               :: 首頁 :: 新隨筆 :: 聯系 :: 聚合  :: 管理

            Section 2.2 - Preface Numbering

            Posted on 2009-03-28 17:10 superman 閱讀(100) 評論(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中文出轨人妻| 中文字幕无码久久久| 久久久久久久91精品免费观看| 久久亚洲AV无码西西人体| 三级韩国一区久久二区综合| 区久久AAA片69亚洲| 国内精品伊人久久久久av一坑| 久久精品国产秦先生| 香蕉99久久国产综合精品宅男自 | 精品久久久无码中文字幕| 亚洲国产天堂久久综合| 99国产欧美久久久精品蜜芽| 97精品国产97久久久久久免费| 久久精品视频一| 久久美女网站免费| 亚洲国产欧洲综合997久久| 久久精品成人影院| 久久精品一区二区| 久久久久久精品免费免费自慰| 99久久99久久精品国产片| 成人午夜精品无码区久久| 久久精品成人免费国产片小草| 久久久久女人精品毛片| 2020久久精品亚洲热综合一本| 996久久国产精品线观看| 久久亚洲精品成人AV| 污污内射久久一区二区欧美日韩 | 久久久久无码国产精品不卡| 韩国免费A级毛片久久| 久久99精品久久久大学生| 久久婷婷五月综合成人D啪| 精品久久久久久无码人妻蜜桃| 国产精品99久久久久久人| 伊人久久综合成人网| 国产精品久久久久久五月尺| 久久93精品国产91久久综合| 国产福利电影一区二区三区久久久久成人精品综合 | 久久综合给合久久狠狠狠97色69 | 国产V亚洲V天堂无码久久久| 久久久噜噜噜久久中文字幕色伊伊 |