• <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
            水得不行的一套題... 確創(chuàng)造了無(wú)數(shù)的WA... ...

            1. 百雞問(wèn)題
                大水不解釋
            //2009年哈爾濱工業(yè)大學(xué)計(jì)算機(jī)研究生機(jī)試題 百雞問(wèn)題
            #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年哈爾濱工業(yè)大學(xué)計(jì)算機(jī)研究生機(jī)試題 求最大值
            #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. 素?cái)?shù)判定
                WA一次... 忘記特判負(fù)數(shù)了...
            //2009年哈爾濱工業(yè)大學(xué)計(jì)算機(jī)研究生機(jī)試題 素?cái)?shù)判定
            #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. 判斷三角形類(lèi)型
                各種WA之后發(fā)現(xiàn)... sort忘寫(xiě)了... 深刻自我檢討... ...
            //2009年哈爾濱工業(yè)大學(xué)計(jì)算機(jī)研究生機(jī)試題 判斷三角形類(lèi)型
            #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得有點(diǎn)小莫名... 第二個(gè)字符getchar讀就WA, 跟第一個(gè)字符串一樣用gets讀就AC...
            //2009年哈爾濱工業(yè)大學(xué)計(jì)算機(jī)研究生機(jī)試題 字符串去特定字符
            #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;
            }
            久久久久亚洲精品无码蜜桃| 久久久亚洲裙底偷窥综合| 伊人久久大香线蕉AV色婷婷色| 国内精品久久久久久久coent | 国产精品久久新婚兰兰| 久久久久国色AV免费看图片| 久久精品国产精品亚洲下载| 狠狠人妻久久久久久综合蜜桃| 久久久久国产亚洲AV麻豆| 国产亚州精品女人久久久久久| 国产精品一区二区久久精品无码| 久久国产精品-久久精品| 99久久精品无码一区二区毛片| 91久久精品电影| 欧美午夜A∨大片久久 | 久久久久亚洲av无码专区| 久久久一本精品99久久精品66| 国产一区二区精品久久| 久久综合九色综合久99| 久久伊人中文无码| 亚洲国产另类久久久精品黑人| 精品永久久福利一区二区| 国产成人久久精品区一区二区| 嫩草影院久久国产精品| 人人狠狠综合久久亚洲| 亚洲va久久久噜噜噜久久天堂| 狠狠久久亚洲欧美专区| 久久久黄片| 97久久久久人妻精品专区| 久久久久18| 久久99精品综合国产首页| 热久久视久久精品18| 久久er国产精品免费观看2| 久久人人爽人人爽AV片| 久久精品国产亚洲AV电影| 久久夜色精品国产| 久久精品国产99国产电影网| 色综合合久久天天给综看| 国产精品视频久久久| 久久精品国产久精国产一老狼| 天天综合久久久网|