• <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)  編輯 收藏 引用
            亚洲国产成人久久笫一页| 久久99国产一区二区三区| 久久久91人妻无码精品蜜桃HD | 久久久久久久综合日本| 精品久久久久久无码中文字幕 | 日本高清无卡码一区二区久久 | 波多野结衣中文字幕久久| 久久久久久无码国产精品中文字幕| 国产精品久久久久一区二区三区| 久久久SS麻豆欧美国产日韩| 久久精品无码一区二区app| 一本久久综合亚洲鲁鲁五月天| 99久久精品日本一区二区免费| 国产视频久久| 精品无码久久久久国产| 亚洲午夜福利精品久久| 久久综合狠狠综合久久激情 | 久久99国产综合精品| 久久精品视频91| 久久这里只精品国产99热 | 99久久精品毛片免费播放| 精品综合久久久久久97| 国产一区二区精品久久岳| 久久久久99精品成人片试看| 中文字幕乱码久久午夜| 国产亚洲精品久久久久秋霞| 国内精品久久久久久久亚洲| 99久久超碰中文字幕伊人| 久久久噜噜噜久久中文字幕色伊伊| 99久久精品国产综合一区| 久久香蕉一级毛片| 国内精品久久久久伊人av| 一本一道久久综合狠狠老| 国产精品99久久久精品无码| 狠狠色综合网站久久久久久久高清| 久久99国产一区二区三区| 伊人久久大香线蕉精品| 国产精品久久久久久搜索| 久久91综合国产91久久精品| 久久99精品免费一区二区| 久久精品国产亚洲7777|