• <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)  編輯 收藏 引用 所屬分類: 規律
            <2012年4月>
            25262728293031
            1234567
            891011121314
            15161718192021
            22232425262728
            293012345

            常用鏈接

            留言簿(3)

            隨筆分類

            隨筆檔案

            文章分類

            文章檔案

            友情鏈接

            搜索

            •  

            最新評論

            閱讀排行榜

            評論排行榜

            久久精品亚洲AV久久久无码| 精产国品久久一二三产区区别| 久久亚洲AV成人无码电影| 一本久久a久久精品亚洲| 久久人妻AV中文字幕| 久久国产乱子精品免费女| 精品国产一区二区三区久久| 97久久精品午夜一区二区| 欧美久久亚洲精品| 国产精品岛国久久久久| 久久久WWW成人免费精品| 2021国内久久精品| 国产欧美久久久精品| 国产精品亚洲综合久久| 婷婷综合久久中文字幕| 久久久午夜精品| 亚洲国产综合久久天堂| 99久久夜色精品国产网站| 韩国三级大全久久网站| 欧美精品国产综合久久| 久久国产精品波多野结衣AV| 国产亚洲欧美精品久久久| 久久精品中文騷妇女内射| 伊人久久大香线蕉亚洲| 久久亚洲AV成人出白浆无码国产| 亚洲性久久久影院| 亚洲AV乱码久久精品蜜桃| 亚洲乱码精品久久久久..| 久久婷婷国产综合精品 | 久久久久99精品成人片直播| 97久久国产露脸精品国产| 久久精品国产亚洲av高清漫画 | 99精品国产在热久久| 亚洲国产成人久久综合一| 久久WWW免费人成—看片| 久久无码国产| 久久er国产精品免费观看2| 亚洲国产精品无码久久青草| 亚洲av伊人久久综合密臀性色| 狠狠色丁香婷婷久久综合不卡| 久久精品国产清自在天天线|