• <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 閱讀(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 
            亚洲∧v久久久无码精品| 2022年国产精品久久久久| 久久久久国产一级毛片高清板| 91精品观看91久久久久久| 久久青青草原精品国产不卡| 97精品依人久久久大香线蕉97| 久久精品国产精品亚洲精品| 久久久WWW成人免费精品| 久久综合综合久久综合| 国内精品伊人久久久久网站| 伊人久久大香线蕉综合Av| 精品久久久久久国产免费了| 久久无码人妻一区二区三区午夜| 久久免费香蕉视频| 久久精品国产亚洲网站| 色诱久久久久综合网ywww| 色婷婷久久综合中文久久一本| 看久久久久久a级毛片| 久久亚洲AV成人无码软件| 久久国产热这里只有精品| 久久精品国产91久久麻豆自制| 亚洲国产精品无码久久SM| 亚洲国产精品嫩草影院久久| 国产成人综合久久久久久| 久久91精品久久91综合| 久久A级毛片免费观看| 伊人久久大香线焦AV综合影院 | 久久精品一本到99热免费| 激情五月综合综合久久69| 久久91精品国产91久久户| 91精品国产综合久久精品| 久久久久久久亚洲Av无码| 色狠狠久久AV五月综合| 久久人人爽人人爽人人片AV不 | 国产精品美女久久久久| 亚洲欧美成人综合久久久| 亚洲精品蜜桃久久久久久| 狠狠综合久久AV一区二区三区| 亚洲中文字幕无码久久综合网| 中文字幕乱码久久午夜| 2021少妇久久久久久久久久|