• <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| 久久99热只有频精品8| 久久国产亚洲精品无码| 久久精品国产精品亚洲精品| 国产69精品久久久久99尤物| 久久久精品日本一区二区三区 | 久久夜色精品国产www| 99久久香蕉国产线看观香| 亚洲第一极品精品无码久久| 久久这里只有精品久久| 久久久婷婷五月亚洲97号色| 大蕉久久伊人中文字幕| 亚洲国产欧美国产综合久久 | 久久se精品一区精品二区国产| 亚洲欧洲日产国码无码久久99| 久久福利青草精品资源站免费| 久久久高清免费视频| 免费一级做a爰片久久毛片潮| 日韩av无码久久精品免费| 色天使久久综合网天天 | 国产一级持黄大片99久久| 曰曰摸天天摸人人看久久久| 久久婷婷五月综合成人D啪| 久久国产视屏| 精品一区二区久久| 青青草原精品99久久精品66| 亚洲午夜久久久| 久久久久高潮综合影院| 久久露脸国产精品| 精品久久久久久久久久中文字幕 | 久久久久久久人妻无码中文字幕爆| 久久久久久久久久免免费精品 | 亚洲国产成人久久综合区| 久久亚洲欧美日本精品| 九九久久99综合一区二区| 国产综合久久久久| 久久不射电影网| 精品久久人人做人人爽综合| 国产免费久久精品丫丫| 国产亚洲精午夜久久久久久| 狠狠人妻久久久久久综合|