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공부방

백준 2083 럭비 클럽 (c++) : 피너클 본문

백준

백준 2083 럭비 클럽 (c++) : 피너클

피너클 2022. 8. 17. 15:00
728x90
반응형

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

 

2083번: 럭비 클럽

입력 받은 각 회원에 대해 이름과 분류를 출력한다. 성인부 회원이면 'Senior', 청소년부 회원이면 'Junior'를 출력한다.

www.acmicpc.net

간단한 구현문제다.

#include <iostream>
#include <algorithm>
#include <string>

using namespace std;

string name;
int age, weight;

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

	while (true) {
		cin >> name >> age >> weight;
		if (name == "#" && age == 0 && weight == 0) break;
		if (age > 17 || weight >= 80) cout << name << " Senior" << '\n';
		else cout << name << " Junior" << '\n';
	}
}

전체코드다.

728x90
반응형
Comments