• <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 
            亚洲国产成人乱码精品女人久久久不卡| 久久精品aⅴ无码中文字字幕不卡| 一本伊大人香蕉久久网手机| 中文字幕成人精品久久不卡| 亚洲国产成人精品无码久久久久久综合| 亚洲欧美成人久久综合中文网| 伊人久久大香线蕉综合Av | 久久精品国产2020| 久久精品国产99久久无毒不卡| 久久99精品国产99久久| 蜜臀久久99精品久久久久久| 久久夜色精品国产噜噜麻豆| 狠狠人妻久久久久久综合蜜桃| 久久亚洲中文字幕精品一区| 国产AV影片久久久久久| 婷婷久久久亚洲欧洲日产国码AV| 久久国产乱子伦精品免费午夜| 亚洲va中文字幕无码久久| 久久婷婷色综合一区二区| 精品久久久久久无码专区| 怡红院日本一道日本久久| 人妻久久久一区二区三区| 亚洲欧洲中文日韩久久AV乱码| 狠狠狠色丁香婷婷综合久久五月| 亚洲精品白浆高清久久久久久| 91久久国产视频| 国产一久久香蕉国产线看观看| 久久亚洲精品中文字幕| 久久亚洲AV成人无码软件| 久久成人永久免费播放| 久久99精品国产麻豆不卡| 久久精品国产亚洲欧美| 国产成人久久AV免费| 久久99精品久久久久久hb无码| 久久天天躁狠狠躁夜夜网站 | 女同久久| 欧美午夜精品久久久久久浪潮| 国产99久久久国产精品~~牛| 99久久精品免费看国产| 国产真实乱对白精彩久久| 久久福利片|