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

            解答:(實(shí)質(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)牙 閱讀(65) 評論(0)  編輯 收藏 引用

            只有注冊用戶登錄后才能發(fā)表評論。
            網(wǎng)站導(dǎo)航: 博客園   IT新聞   BlogJava   博問   Chat2DB   管理


            国产精品久久久久久五月尺| 97久久综合精品久久久综合| 久久久久亚洲AV综合波多野结衣| 久久精品免费大片国产大片| 亚洲国产成人久久精品99| 久久婷婷五月综合国产尤物app| 欧美牲交A欧牲交aⅴ久久| 久久婷婷久久一区二区三区| 久久人妻少妇嫩草AV蜜桃| 精品久久久久久无码专区| 久久无码精品一区二区三区| 亚洲熟妇无码另类久久久| 2021国产成人精品久久| 少妇久久久久久久久久| 久久久久国产一级毛片高清板| 无码精品久久久久久人妻中字| Xx性欧美肥妇精品久久久久久| 亚洲日本va中文字幕久久| 国内精品伊人久久久久网站| 青草国产精品久久久久久 | A级毛片无码久久精品免费| 777久久精品一区二区三区无码| 久久亚洲国产最新网站| 久久久久18| 91精品国产91热久久久久福利 | 亚洲欧美成人综合久久久| 99久久精品国产一区二区三区| 色偷偷偷久久伊人大杳蕉| 亚洲国产成人久久综合一区77| 色偷偷888欧美精品久久久| 久久久久亚洲AV无码专区体验| 久久精品国产亚洲av麻豆蜜芽| 久久久久一级精品亚洲国产成人综合AV区| 久久久噜噜噜www成人网| 777午夜精品久久av蜜臀| 性做久久久久久久久久久| 久久国产成人午夜AV影院| 久久久久亚洲AV成人网人人软件| 久久久久一区二区三区| 久久久青草久久久青草| 亚洲天堂久久精品|