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

            常用鏈接

            留言簿(3)

            隨筆分類

            隨筆檔案

            文章分類

            文章檔案

            友情鏈接

            搜索

            •  

            最新評論

            閱讀排行榜

            評論排行榜

            日产精品久久久一区二区| 久久91精品综合国产首页| 亚洲国产美女精品久久久久∴ | 中文字幕无码久久精品青草 | 久久伊人影视| 亚洲精品无码成人片久久| 久久青草国产精品一区| 欧美亚洲另类久久综合婷婷 | 国产产无码乱码精品久久鸭| 狠狠人妻久久久久久综合蜜桃| 国产精品久久新婚兰兰| 蜜桃麻豆www久久| 亚洲午夜久久久久妓女影院| 久久久噜噜噜久久| 国产精品久久久久影视不卡| 色综合久久综合中文综合网 | 日产精品久久久久久久| 免费精品久久久久久中文字幕| 国产精品毛片久久久久久久| 无码8090精品久久一区| 国产精品久久久久无码av| 无码人妻久久久一区二区三区| 久久福利资源国产精品999| 丁香五月综合久久激情| 久久精品免费观看| 久久99国产综合精品女同| 精品国产99久久久久久麻豆| 久久有码中文字幕| 国产精品狼人久久久久影院| 久久亚洲欧美日本精品| 亚洲综合婷婷久久| 国产欧美久久久精品| 99久久精品费精品国产一区二区| 久久久久久国产精品无码超碰| 国产精品久久久久蜜芽| 国内精品伊人久久久久妇| 精品久久久久成人码免费动漫 | 一本色道久久88加勒比—综合| 国产精品99久久免费观看| 久久91精品久久91综合| 国产精品成人久久久久三级午夜电影|