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

            藍牙博客

            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

            解答:(實質就是一個四舍五入的題)
            #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 藍牙 閱讀(64) 評論(0)  編輯 收藏 引用
            成人a毛片久久免费播放| 一本一本久久a久久精品综合麻豆| 精品久久久久久无码人妻热| 欧美亚洲另类久久综合| 久久国产精品免费一区二区三区 | 99久久精品九九亚洲精品| 国产精品9999久久久久| 狠狠色丁香婷综合久久| 久久亚洲高清综合| 午夜不卡久久精品无码免费| jizzjizz国产精品久久| 亚洲国产精品综合久久一线| 久久Av无码精品人妻系列| 狠狠精品干练久久久无码中文字幕| 伊人久久大香线蕉综合热线| 精品久久久久久中文字幕| 久久天天躁狠狠躁夜夜躁2014| 久久久无码精品亚洲日韩按摩 | 亚洲狠狠久久综合一区77777 | A级毛片无码久久精品免费| 国产69精品久久久久观看软件| 色综合久久综精品| 久久99精品久久久久久动态图| 亚洲精品成人久久久| 精品水蜜桃久久久久久久| 91精品国产91久久久久福利| 日韩乱码人妻无码中文字幕久久 | 国产一级做a爰片久久毛片| 久久精品国产乱子伦| 伊人色综合久久天天人守人婷| 久久精品国产精品亚洲| 国产 亚洲 欧美 另类 久久| 91精品无码久久久久久五月天| 国产精品99精品久久免费| 精品国产VA久久久久久久冰| 无码精品久久久久久人妻中字| 一本色道久久99一综合| 久久久亚洲欧洲日产国码是AV| 思思久久精品在热线热| 久久久久久伊人高潮影院| 97精品依人久久久大香线蕉97 |