• <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)論排行榜

            国产精品99久久久久久人| 久久99国产综合精品免费| 久久99热狠狠色精品一区| 久久免费精品一区二区| 久久不射电影网| 久久影院亚洲一区| 97久久久久人妻精品专区| 久久久久国产日韩精品网站| 一本色道久久综合| 天天久久狠狠色综合| 久久亚洲精品国产精品婷婷| 久久精品国产亚洲av麻豆色欲| 香港aa三级久久三级| 亚洲狠狠婷婷综合久久久久| 久久成人精品| 日韩人妻无码精品久久久不卡| 久久99亚洲综合精品首页| 久久久国产99久久国产一| 久久精品国产亚洲精品2020| 思思久久99热只有频精品66| 99热都是精品久久久久久| 伊人色综合久久天天人手人婷| 国产精品久久久久久搜索| 午夜天堂av天堂久久久| 怡红院日本一道日本久久 | 少妇人妻88久久中文字幕| 国产精品美女久久久久av爽| 三上悠亚久久精品| 亚洲国产精品无码成人片久久| 亚洲精品无码专区久久同性男| 久久精品国产久精国产| 国产精品视频久久久| 99久久精品国内| 久久福利青草精品资源站| 粉嫩小泬无遮挡久久久久久| 亚洲AV日韩精品久久久久| 国产成人无码精品久久久性色| 国产精品亚洲综合久久| 久久婷婷五月综合成人D啪| 久久久久久久精品妇女99| 久久精品国产亚洲av麻豆蜜芽 |