杭电HDU练习题_hdu_1.2.3

作者在 2013-04-29 16:12:55 发布以下内容
#include <stdio.h>

int main(void)
{
    int line, no_advertise, do_advertise, cost;
    scanf("%d", &line);

    while(line--)
    {
        int tmp;
        scanf("%d %d %d", &no_advertise, &do_advertise, &cost);
        tmp = do_advertise - cost - no_advertise;

        if(tmp > 0) printf("advertise\n");
        else if(tmp < 0) printf("do not advertise\n");
        else printf("does not matter\n");
    }



    return 0;
}
HDU | 阅读 982 次
文章评论,共0条
游客请输入验证码
浏览41426次