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

            藍(lán)牙博客

            i want to be a coder~

               :: 首頁 ::  ::  :: 管理

            搜索

            •  

            最新評論

            浙大1018 Be carefull

            Be carefull
            Time Limit:1000MS  Memory Limit:32768K


            Description:
            “Be carefull about the precision!”When Tyr doing his mathemetic homework,teacher Mr.Qian always giving this warning to him.Now,Tyr has finished his mathemetic homework,and here is your task to check whether Tyr’s answer is correct or not.

            Input:
            The input consist of several cases.The first line gives the case number N, the next part has N cases.Each case is consist of two number R and I.R is a real number; I is an integer number.
            Output:
            For each case please give your check.If R rounds to I,then print “Correct” in a single line, or,print “Not Correct”.For more detail,please look at the samples.
            Sample Input:
            5
            1.20 1
            0.5 1
            9.9 10
            2.9 2
            3.4999 3Sample Output:
            Correct
            Correct
            Correct
            Not Correct
            Correct

            解答:(實質(zhì)就是一個四舍五入的題)
            #include <iostream>
            #include <string>
            using namespace std;
            int main()
            {
             int a,t,T,tmp;
             double s;
             scanf("%d",&T);
             while(T--)
             {
              scanf("%lf%d",&s,&a);
              s=s*10;
              tmp=s;
              t=tmp%10;
              tmp/=10;
              if(t>4) tmp+=1;
              if(tmp==a) printf("Correct\n");
              else printf("Not Correct\n");
             }
             return 0;
            }


            文章來源:http://www.cnblogs.com/qnbs1/archive/2010/03/21/1691073.html
            posted on 2010-03-21 17:56 藍(lán)牙 閱讀(61) 評論(0)  編輯 收藏 引用
            国内精品久久久久久不卡影院| 久久99久久99小草精品免视看 | 久久精品国产99久久久| 久久久综合九色合综国产| 99精品国产99久久久久久97| 美女久久久久久| 久久久久无码精品| 国产一区二区三精品久久久无广告| 久久狠狠高潮亚洲精品| 亚洲av日韩精品久久久久久a| 国产A三级久久精品| 18岁日韩内射颜射午夜久久成人| 亚洲国产欧美国产综合久久| 亚洲中文字幕无码一久久区| 色综合久久中文字幕无码| 婷婷五月深深久久精品| 久久久国产乱子伦精品作者| 国产韩国精品一区二区三区久久| 97久久精品午夜一区二区| 久久久久四虎国产精品| 久久93精品国产91久久综合| 精品多毛少妇人妻AV免费久久 | 久久伊人精品青青草原日本| 婷婷久久综合九色综合绿巨人| 久久伊人五月天论坛| 久久精品国产99国产精品亚洲| 国内精品久久久久久99蜜桃| 日本久久久精品中文字幕| 久久99热这里只有精品国产 | 无码专区久久综合久中文字幕| 午夜精品久久久久久中宇| 伊人久久综在合线亚洲2019| 精品熟女少妇aⅴ免费久久| 亚洲国产日韩欧美综合久久| …久久精品99久久香蕉国产 | 亚洲а∨天堂久久精品| 性高湖久久久久久久久| 久久久久成人精品无码| 色综合久久久久无码专区| 91精品免费久久久久久久久| 久久精品国产久精国产果冻传媒|