#include <stdio.h>

int main() {
    int N, M;

    scanf("%d", &N);

    while (1) {
        scanf("%d", &M);
        if (N == M) {
            printf("RIGHT");
            return 0;  // break문을 쓰지 않아도 정답이 나오면 프로그램 종료, 그 전까지는 무한 반복
        }
        else if (N > M) {
            printf("UP\n");
        }
        else {
            printf("DOWN\n");
        }
    }
    return 0;
}

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: