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

            Uriel's Corner

            Research Associate @ Harvard University / Research Interests: Computer Vision, Biomedical Image Analysis, Machine Learning
            posts - 0, comments - 50, trackbacks - 0, articles - 594
                    兩套, 一共6題, 都是大水啦~

            1. 分段函數(shù)
            //2001年清華大學(xué)計(jì)算機(jī)研究生機(jī)試題(第I套) 分段函數(shù)
            #include<stdio.h>
            #include
            <stdlib.h>

            int main() {
                
            double x, b;
                
            while(~scanf("%lf"&x)) {
                    
            if(0 <= x && x < 2) b = -+ 2.5;
                    
            else if(2 <= x && x < 4) b = 2 - 1.5 * (x - 3* (x - 3);
                    
            else if(4 <= x && x < 6) b = x / 2.0 - 1.5;
                    printf(
            "%.3lf\n", b);
                }

                
            return 0;
            }


            2. 整數(shù)和
            //2001年清華大學(xué)計(jì)算機(jī)研究生機(jī)試題(第I套) 整數(shù)和
            #include<stdio.h>
            #include
            <stdlib.h>

            int main() {
                
            int n, i, t;
                
            while(~scanf("%d"&n)) {
                    
            if(n >= 0{
                        t 
            = 0;
                        
            for(i = 0; i <= n; ++i) t += n + i;
                    }

                    
            else {
                        t 
            = 0;
                        
            for(i = 0; i <= -n; ++i) t += n - i;
                    }

                    printf(
            "%d\n", t);
                }

                
            return 0;
            }


            3. 反序數(shù)
            //2001年清華大學(xué)計(jì)算機(jī)研究生機(jī)試題(第I套) 反序數(shù)
            #include<stdio.h>
            #include
            <stdlib.h>

            int main() {
                
            int i, t1, t2, t3, t4;
                
            for(i = 1000; i <= 9999++i) {
                    t1 
            = i % 10;
                    t2 
            = i % 100 - t1;
                    t3 
            = i % 1000 - t1 - t2;
                    t4 
            = i /1000;
                    
            //printf("%d %d %d %d\n", t1, t2, t3, t4);
                    if(t1 * 1000 + t2 * 10 + t3 / 10 + t4 == 9 * i) printf("%d\n", i);
                }

                
            return 0;
            }


            4. 輸出梯形
                感覺題目有點(diǎn)表述不清... WA兩次啊... 原來是多case...
            //2001年清華大學(xué)計(jì)算機(jī)研究生機(jī)試題(第II套) 輸出梯形
            #include<stdio.h>
            #include
            <stdlib.h>

            int main() {
                
            int n, i, j;
                
            while(~scanf("%d"&n)) {
                    
            for(i = 0; i < n; ++i) {
                        
            for(j = 0; j < 2 * (n - i - 1); ++j) putchar(' ');
                        
            for(j = 0; j < 2 * i + n; ++j) putchar('*');
                        puts(
            "");
                    }

                }

                
            return 0;
            }


            5. 字符串排序
            //2001年清華大學(xué)計(jì)算機(jī)研究生機(jī)試題(第II套) 字符串排序
            #include<stdio.h>
            #include
            <stdlib.h>
            #include
            <string.h>
            #include
            <algorithm>
            using namespace std;

            int main() {
                
            char s[30];
                
            while(gets(s) != NULL) {
                    sort(s, s 
            + strlen(s));
                    puts(s);
                }

                
            return 0;
            }


            6. n的階乘
                long long夠了
            //2001年清華大學(xué)計(jì)算機(jī)研究生機(jī)試題(第II套) n的階乘
            #include<stdio.h>
            #include
            <stdlib.h>

            int main() {
                
            int i;
                
            long long n;
                
            while(~scanf("%lld"&n)) {
                    
            for(i = n -1; i >= 1--i) n *= i;
                    printf(
            "%lld\n", n); 
                }

                
            return 0;
            }
            A级毛片无码久久精品免费| 婷婷久久综合九色综合98| 国内精品久久久久国产盗摄| 成人精品一区二区久久久| 欧美久久一区二区三区| 久久WWW免费人成一看片| 国产精品国色综合久久| 久久国产精品免费一区| 伊人久久精品无码av一区| 国产成人精品久久亚洲| 久久人妻无码中文字幕| 国产精品青草久久久久福利99| 一97日本道伊人久久综合影院| 77777亚洲午夜久久多喷| 久久无码国产| 2020最新久久久视精品爱| 99久久精品国产一区二区| 久久精品亚洲乱码伦伦中文| 久久笫一福利免费导航| 夜夜亚洲天天久久| 国内精品久久人妻互换| 怡红院日本一道日本久久| 狠狠色综合网站久久久久久久高清 | 久久久精品一区二区三区| 久久久久久久女国产乱让韩| 久久国产三级无码一区二区| 久久国产乱子伦免费精品| 久久亚洲视频| 久久久久亚洲AV成人网| 青青青国产精品国产精品久久久久| 99久久国产综合精品女同图片| 2021国产精品久久精品| 四虎国产精品成人免费久久| 久久996热精品xxxx| 久久久久久噜噜精品免费直播| 88久久精品无码一区二区毛片 | 久久精品中文无码资源站| 久久久不卡国产精品一区二区| 九九久久精品国产| 久久九色综合九色99伊人| 怡红院日本一道日本久久 |