• <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
            水得不行的一套題... 確創造了無數的WA... ...

            1. 百雞問題
                大水不解釋
            //2009年哈爾濱工業大學計算機研究生機試題 百雞問題
            #include<stdio.h>
            #include
            <stdlib.h>
            #include
            <string.h>

            double n;

            int main() {
                
            int i, j, k;
                
            while(~scanf("%lf"&n)) {
                    
            for(i = 05 * i <= n; ++i) {
                        
            for(j = 03 * j <= n; ++j) {
                            
            if((100 - i - j) / 3.0 + 5 * i + 3 * j <= n) printf("x=%d,y=%d,z=%d\n", i, j, 100 - i - j);
                        }

                    }

                }

                
            return 0;
            }


            2. 求最大值
                大水不解釋
            //2009年哈爾濱工業大學計算機研究生機試題 求最大值
            #include<stdio.h>
            #include
            <stdlib.h>
            #include
            <string.h>

            int main() {
                
            int mx, a, i;
                
            while(~scanf("%d"&mx)) {
                    
            for(i = 1; i < 10++i) {
                        scanf(
            "%d"&a);
                        
            if(a > mx) mx = a;
                    }

                    printf(
            "max=%d\n", mx);
                }

                
            return 0;
            }


            3. 素數判定
                WA一次... 忘記特判負數了...
            //2009年哈爾濱工業大學計算機研究生機試題 素數判定
            #include<stdio.h>
            #include
            <stdlib.h>
            #include
            <string.h>

            int main() {
                
            int i, n, ok;
                
            while(~scanf("%d"&n)) {
                    
            if(n <= 1{
                        puts(
            "no");
                        
            continue;
                    }

                    ok 
            = 1;
                    
            for(i = 2; i * i <= n; ++i) {
                        
            if(n % i == 0{
                            ok 
            = 0;
                            
            break;
                        }

                    }

                    
            if(!ok) puts("no");
                    
            else
                        puts(
            "yes");
                }

                
            return 0;
            }


            4. 判斷三角形類型
                各種WA之后發現... sort忘寫了... 深刻自我檢討... ...
            //2009年哈爾濱工業大學計算機研究生機試題 判斷三角形類型
            #include<stdio.h>
            #include
            <stdlib.h>
            #include
            <string.h>
            #include
            <algorithm>
            using namespace std;
            double a[3];

            int main() {
                
            while(~scanf("%lf %lf %lf"&a[0], &a[1], &a[2])) {
                    sort(a, a 
            + 3);
                    
            if(a[2* a[2== a[0* a[0+ a[1* a[1]) puts("直角三角形");
                    
            else if(a[2* a[2< a[0* a[0+ a[1* a[1]) puts("銳角三角形");
                    
            else
                        puts(
            "鈍角三角形");
                }

                
            return 0;
            }


            5. 字符串去特定字符
                這題WA得有點小莫名... 第二個字符getchar讀就WA, 跟第一個字符串一樣用gets讀就AC...
            //2009年哈爾濱工業大學計算機研究生機試題 字符串去特定字符
            #include<stdio.h>
            #include
            <stdlib.h>
            #include
            <string.h>

            char s[1000000], c[5];

            int main() {
                
            int i;
                
            while(gets(s) != NULL) {
                    gets(c);
                    
            for(i = 0; s[i]; ++i) {
                        
            if(s[i] != c[0]) putchar(s[i]);
                    }

                    puts(
            "");
                }

                
            return 0;
            }
            久久99精品免费一区二区| 久久国产精品久久国产精品| 久久精品成人免费国产片小草| 91精品国产9l久久久久| 国产精品99久久不卡| 欧美精品丝袜久久久中文字幕 | 99久久亚洲综合精品成人| 国产成人精品久久亚洲高清不卡 | 久久人妻少妇嫩草AV蜜桃| 久久精品综合网| 国产成人久久激情91| 亚洲精品97久久中文字幕无码| 亚洲AV无码久久精品色欲| 国产精品gz久久久| 久久精品蜜芽亚洲国产AV| 久久久中文字幕日本| 潮喷大喷水系列无码久久精品| 久久亚洲中文字幕精品一区| 久久精品亚洲一区二区三区浴池 | 久久亚洲精品人成综合网| 久久亚洲精品视频| 婷婷伊人久久大香线蕉AV| 精品久久人人做人人爽综合| av无码久久久久不卡免费网站 | 色99久久久久高潮综合影院 | 狠狠色狠狠色综合久久| 久久综合视频网站| 久久精品成人| 94久久国产乱子伦精品免费| 久久久久久久久久久久中文字幕 | 国产精品美女久久久久| 久久精品国产精品亚洲精品| 久久久久香蕉视频| 久久不见久久见免费影院www日本| 久久成人影院精品777| 国产一级做a爰片久久毛片| 2021少妇久久久久久久久久| 热99RE久久精品这里都是精品免费| 欧美久久综合九色综合| 人人狠狠综合久久亚洲高清| 香蕉久久影院|