[恢]hdu 2010

2011-12-14 04:06:19

地址:http://acm.hdu.edu.cn/showproblem.php?pid=2010

题意:中文。。。

代码:

# include <stdio.h>


int main ()
{
    int i, a, b, flag ;
    int daff[4] = {153, 370, 371, 407} ;
    while (~scanf ("%d%d", &a, &b))
    {
        flag = 0 ;
        for (i = 0 ; i < 4 ; i++) 
            if (daff[i] >= a && daff[i] <= b)
            {
                if (flag == 0) flag = 1 ;
                else printf (" ") ;
                printf ("%d", daff[i]) ;
            }
        if (flag == 0) printf ("no\n") ;
        else printf ("\n") ;
    }
    return 0 ;
}

 



posted @ 2012-01-06 14:28  Seraph2012  阅读(166)  评论(0编辑  收藏  举报