• <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 閱讀(229) 評(píng)論(0)  編輯 收藏 引用 所屬分類: 規(guī)律
            <2011年2月>
            303112345
            6789101112
            13141516171819
            20212223242526
            272812345
            6789101112

            常用鏈接

            留言簿(3)

            隨筆分類

            隨筆檔案

            文章分類

            文章檔案

            友情鏈接

            搜索

            •  

            最新評(píng)論

            閱讀排行榜

            評(píng)論排行榜

            青青草原综合久久大伊人导航| 精品久久久久成人码免费动漫| 天天躁日日躁狠狠久久| 精品国产乱码久久久久久1区2区| 久久99国产精一区二区三区| 国产福利电影一区二区三区久久老子无码午夜伦不 | 色综合久久中文色婷婷| 精品视频久久久久| 亚洲精品乱码久久久久久中文字幕| 国产韩国精品一区二区三区久久| 久久久久亚洲精品男人的天堂 | 亚洲中文精品久久久久久不卡| 久久99国产精品尤物| 亚洲伊人久久综合中文成人网| 久久久久国产精品熟女影院| 久久免费国产精品| 久久国产精品无码HDAV| 四虎亚洲国产成人久久精品| 亚洲∧v久久久无码精品| 亚洲国产成人精品女人久久久 | 国产精品久久久久久久| 日本精品久久久久久久久免费| 国内精品久久久久| 亚洲中文字幕无码久久精品1| 精品久久久久国产免费| 国产精品久久久久影视不卡| 久久久久亚洲AV无码观看 | 久久精品视频网| 国产精品一区二区久久精品涩爱 | 久久亚洲欧美日本精品| 欧美一区二区三区久久综合| 中文精品久久久久人妻不卡| 伊人色综合久久天天人守人婷| 久久久久久极精品久久久| 国产精品亚洲综合专区片高清久久久| 亚洲精品无码成人片久久| 午夜精品久久久久久| 久久久久国产一区二区| 久久精品国产精品亚洲人人 | 99久久免费国产特黄| 日韩精品久久无码中文字幕|