[UVa #12372] Packing for Holiday

tolelom·2022년 7월 5일
0

UVa

목록 보기
14/20

문제 설명

문제 링크
상자의 가로, 세로, 높이가 주어지면 이 상자가 20202020 * 20 * 20 크기의 상자안에 들어갈 수 있는지 판별하시오

알고리즘

간단한 조건문 문제

코드

#include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define INF 1000000000

int t;

int main() {
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);

    cin >> t;
    for (int tc = 1; tc <= t; tc++){
        int l, w, h;
        cin >> l >> w >> h;

        cout << "Case " << tc << ": ";

        if (l <= 20 && w <= 20 && h <= 20)
            cout << "good" << '\n';
        else cout << "bad" << '\n';
    }
}
profile
이것 저것 작성하는 기술 블로그

0개의 댓글