• <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)

            隨筆分類

            隨筆檔案

            文章分類

            文章檔案

            友情鏈接

            搜索

            •  

            最新評論

            閱讀排行榜

            評論排行榜

            久久久久99精品成人片直播| 国产精品VIDEOSSEX久久发布 | 97精品伊人久久大香线蕉app| 中文字幕久久久久人妻| 精品久久久久香蕉网| 久久精品这里只有精99品| 久久亚洲春色中文字幕久久久| 亚洲伊人久久大香线蕉苏妲己| 精品无码久久久久国产动漫3d| 国产精品一久久香蕉产线看| 久久久久女教师免费一区| 国内精品久久国产大陆| 77777亚洲午夜久久多人| 久久五月精品中文字幕| 99re这里只有精品热久久| 伊人久久综合无码成人网| 久久99精品久久久久久秒播| 久久66热人妻偷产精品9| 久久亚洲精品成人无码网站| 久久久久人妻一区精品| 亚洲嫩草影院久久精品| 精品国产VA久久久久久久冰| 久久伊人五月丁香狠狠色| 久久国产精品波多野结衣AV| 色综合久久久久| 欧美激情精品久久久久| 久久久久久久久久久久中文字幕| 久久中文字幕人妻丝袜| 国产精品久久久久久久app| 精品久久久久久国产牛牛app| 亚洲国产成人久久综合一 | 久久夜色精品国产噜噜亚洲AV| 老男人久久青草av高清| 久久天天躁狠狠躁夜夜不卡| 亚洲七七久久精品中文国产 | 久久99热这里只有精品国产| 久久国产精品-久久精品| 99热热久久这里只有精品68| 久久国产影院| 性做久久久久久久久浪潮| 久久久噜噜噜久久中文字幕色伊伊 |