• <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 藍牙 閱讀(61) 評論(0)  編輯 收藏 引用
            91精品国产高清91久久久久久| 亚洲精品成人网久久久久久| 蜜桃麻豆WWW久久囤产精品| 日本精品久久久中文字幕| 粉嫩小泬无遮挡久久久久久| 97热久久免费频精品99| 久久国产精品成人影院| 久久人人爽人人爽人人AV| 亚洲综合伊人久久综合| 日韩精品久久无码中文字幕| 97精品国产97久久久久久免费| 精品久久亚洲中文无码| 精品伊人久久久| 欧美一区二区三区久久综| 精品熟女少妇av免费久久| 99久久精品免费看国产一区二区三区 | 久久久WWW成人免费精品| 久久久久这里只有精品| 久久综合久久综合亚洲| 久久精品国产亚洲AV蜜臀色欲| 欧美亚洲色综久久精品国产| 精品久久久久久亚洲精品| 久久电影网| 人妻久久久一区二区三区| 99国内精品久久久久久久| 中文字幕精品久久久久人妻| 久久无码人妻一区二区三区| 亚洲精品高清久久| 欧美激情一区二区久久久| 99久久久国产精品免费无卡顿| 日本道色综合久久影院| 一本一本久久a久久精品综合麻豆| 久久夜色精品国产欧美乱| 国产精品美女久久久免费| 久久精品国产亚洲AV蜜臀色欲| 久久久综合九色合综国产| 久久亚洲熟女cc98cm| 精品无码久久久久久国产| 色婷婷综合久久久久中文| 久久国产视屏| 蜜桃麻豆www久久|