새소식

Algorithm/Acmicpc.net (백준)

[C언어] 백준 : 앵그리 창영 (3034번)

  • -
#include <stdio.h>
#include <math.h>
int main()
{
    int n, w, h, match;
    double box;
    scanf("%d %d %d", &n, &w, &h);
    box = sqrt(w * w + h * h);
    for (int i = 0; i < n; i++) {
        scanf("%d", &match);
        if (match > box) {
            printf("NE\n");
        }
        else {
            printf("DA\n");
        }
    }
    return 0;
}

 

Contents

포스팅 주소를 복사했습니다

이 글이 도움이 되었다면 공감 부탁드립니다.