• <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 閱讀(226) 評論(0)  編輯 收藏 引用 所屬分類: 規律
            <2009年7月>
            2829301234
            567891011
            12131415161718
            19202122232425
            2627282930311
            2345678

            常用鏈接

            留言簿(3)

            隨筆分類

            隨筆檔案

            文章分類

            文章檔案

            友情鏈接

            搜索

            •  

            最新評論

            閱讀排行榜

            評論排行榜

            久久久久国产一区二区| 精品久久久久久亚洲精品| 国产精品丝袜久久久久久不卡| 99999久久久久久亚洲| 亚洲国产天堂久久综合网站| 日本精品久久久久影院日本| 色婷婷久久综合中文久久蜜桃av | 国产精品免费久久| 欧美久久一区二区三区| 人妻精品久久久久中文字幕69| 国产69精品久久久久9999| 精品久久久一二三区| 91精品国产91久久久久福利| 久久精品国产亚洲Aⅴ香蕉 | 国产午夜精品久久久久免费视| 日本久久久久久中文字幕| 久久这里的只有是精品23| 精品一区二区久久| 亚洲国产日韩欧美久久| 精品一区二区久久久久久久网站| 亚洲成av人片不卡无码久久| 久久国产一区二区| 亚洲午夜久久久久久久久久| 亚洲国产精品一区二区三区久久 | 亚洲国产成人久久一区WWW| 2021精品国产综合久久| 国产69精品久久久久久人妻精品| 国产精品永久久久久久久久久| a高清免费毛片久久| 一本一本久久A久久综合精品 | 久久不见久久见免费视频7| 久久久久亚洲AV成人网人人软件| 青青草原精品99久久精品66| 中文字幕亚洲综合久久菠萝蜜| 久久天天躁狠狠躁夜夜av浪潮| 国产精品伊人久久伊人电影 | 伊人色综合久久天天人守人婷| 狠狠久久综合伊人不卡| 一本一道久久精品综合| 国产激情久久久久影院小草| 国产999精品久久久久久|