Notice
Recent Posts
Recent Comments
Link
250x250
«   2025/08   »
1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30
31
Archives
Today
Total
관리 메뉴

피너클의 it공부방

백준 10768 특별한 날 (c++) : 피너클 본문

백준

백준 10768 특별한 날 (c++) : 피너클

피너클 2022. 6. 4. 13:31
728x90
반응형

https://www.acmicpc.net/problem/10768

 

10768번: 특별한 날

마지막 줄에 "Before", "After"나 "Special"을 출력한다.

www.acmicpc.net

단순한 구현 문제다.

#include <iostream>

using namespace std;

int a, b;

int main()
{
	ios_base::sync_with_stdio(0);
	cin.tie(0);
	cout.tie(0);

	cin >> a >> b;
	if (a == 2 && b == 18) cout << "Special" << endl;
	else if ((a == 2 && b < 18) || a < 2) cout << "Before" << endl;
	else cout << "After" << endl;
}

전체코드다.

728x90
반응형
Comments