문제 링크입니다: www.acmicpc.net/problem/20673
20673번: Covid-19
The input consists of two lines. The first line contains an integer p (0 ⩽ p ⩽ 1000), showing the average number of new cases per day in every one million population in Hana’s city over the past two weeks. The second line contains an integer q (0 ⩽
www.acmicpc.net
간단한 구현 문제였습니다.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
using namespace std; | |
int main(void) | |
{ | |
ios_base::sync_with_stdio(0); | |
cin.tie(0); | |
int p, q; | |
cin >> p >> q; | |
if (50 >= p && 10 >= q) | |
{ | |
cout << "White\n"; | |
} | |
else if (30 <= q) | |
{ | |
cout << "Red\n"; | |
} | |
else | |
{ | |
cout << "Yellow\n"; | |
} | |
return 0; | |
} |


개발환경:Visual Studio 2017
지적, 조언, 질문 환영입니다! 댓글 남겨주세요~
반응형
'알고리즘 > BOJ' 카테고리의 다른 글
백준 21185번 Some Sum (0) | 2021.03.30 |
---|---|
백준 20976번 2 番目に大きい整数 (0) | 2021.03.30 |
백준 20499번 Darius님 한타 안 함? (0) | 2021.03.30 |
백준 20353번 Atrium (0) | 2021.03.29 |
백준 20352번 Circus (0) | 2021.03.29 |