• <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 藍牙 閱讀(65) 評論(0)  編輯 收藏 引用
            狠狠综合久久综合中文88| 亚洲国产成人久久精品影视| 久久精品18| 无码人妻久久一区二区三区免费丨 | 中文字幕人妻色偷偷久久| 午夜精品久久久久久中宇| 精品久久久久久久久中文字幕| 久久本道综合久久伊人| 久久久久久久波多野结衣高潮| 久久国产精品免费| 久久精品人人做人人爽电影| 女人香蕉久久**毛片精品| 久久无码人妻一区二区三区午夜| 久久亚洲精品国产亚洲老地址| 狠狠色丁香久久综合五月| 伊人热热久久原色播放www| 久久亚洲欧洲国产综合| 91久久香蕉国产熟女线看| 久久99久久99精品免视看动漫| 青青国产成人久久91网| 综合网日日天干夜夜久久| 久久嫩草影院免费看夜色| 精品综合久久久久久97超人 | 久久99国产综合精品免费| 久久精品国产亚洲AV忘忧草18| 青青国产成人久久91网| 1000部精品久久久久久久久| 国产高潮国产高潮久久久| 久久久久久久精品成人热色戒 | 久久久精品日本一区二区三区| 国产91色综合久久免费| 久久一日本道色综合久久| 77777亚洲午夜久久多人| 一本色综合久久| 四虎国产精品成人免费久久| 久久这里都是精品| 久久精品成人| 蜜桃麻豆www久久国产精品| 久久久99精品一区二区| 无码任你躁久久久久久老妇| 亚洲色欲久久久综合网东京热|