• <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>
            posts - 195,  comments - 30,  trackbacks - 0

            In arithmetic we often use the scheme called 'round up by five' to round up a decimal fraction number into a decimal integer number whose fraction part equals to or is bigger than 0.5, otherwise, its fraction part is discarded.

            In this problem, you are to implement a similar sheme called 'round up by six'.

            Input

            The first line of the input is an integer N indicating the number of cases you are to process. Then from the second line there are N lines, each containing a number (may or may not be fractional).

            Output

            For each number in the input, you are to print the round-up-by-six version of the number in a single line.

            Sample Input

            2
            25.599
            0.6
            

            Sample Output

            25
            1
            
             
            #include<iostream>
            #include<cmath>
            using namespace std;
            int main()
            {int n;
            cin>>n;
            while(n--)
            {  double a;
            cin>>a;
            double b=floor(a);
            if(a-b>=0.6)
            cout<<b+1<<endl;
            else
            cout<<b<<endl;
            }
            return 0;
            }
            
            posted on 2009-07-03 00:56 luis 閱讀(239) 評論(0)  編輯 收藏 引用 所屬分類: 規律
            <2009年7月>
            2829301234
            567891011
            12131415161718
            19202122232425
            2627282930311
            2345678

            常用鏈接

            留言簿(3)

            隨筆分類

            隨筆檔案

            文章分類

            文章檔案

            友情鏈接

            搜索

            •  

            最新評論

            閱讀排行榜

            評論排行榜

            久久美女网站免费| 亚洲国产精品久久| 亚洲精品无码专区久久同性男| 亚洲国产成人久久综合碰碰动漫3d | 久久WWW免费人成—看片| 久久一区二区三区99| 精品久久久中文字幕人妻| 久久国产色AV免费看| 国内精品免费久久影院| 老男人久久青草av高清| 久久99精品国产| 亚洲国产精品一区二区三区久久| 精品水蜜桃久久久久久久| 欧美伊人久久大香线蕉综合| 97久久超碰成人精品网站| 欧美午夜A∨大片久久| 国产精品视频久久久| 午夜肉伦伦影院久久精品免费看国产一区二区三区 | 国产精品99久久久久久宅男| 亚洲а∨天堂久久精品9966| 99久久人妻无码精品系列蜜桃 | 97视频久久久| 久久精品无码一区二区无码| 中文字幕久久欲求不满| 国产精品99久久免费观看| 久久精品卫校国产小美女| 亚洲精品国产综合久久一线| 99久久国产综合精品五月天喷水| 亚洲中文字幕无码久久综合网| 欧美激情精品久久久久久久九九九| 久久精品国产亚洲av麻豆小说| 国产精品久久久久蜜芽| 99国内精品久久久久久久| 99久久精品无码一区二区毛片| 久久偷看各类wc女厕嘘嘘| 国产精品免费久久久久影院| 青青草国产精品久久| 18禁黄久久久AAA片| 亚洲精品乱码久久久久久| 国产精品欧美久久久久无广告| 88久久精品无码一区二区毛片 |