Notice
Recent Posts
Recent Comments
Link
250x250
«   2025/05   »
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공부방

백준 2752 세수정렬 (c++) : 피너클 본문

백준

백준 2752 세수정렬 (c++) : 피너클

피너클 2022. 6. 1. 13:44
728x90
반응형

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

 

2752번: 세수정렬

숫자 세 개가 주어진다. 이 숫자는 1보다 크거나 같고, 1,000,000보다 작거나 같다. 이 숫자는 모두 다르다.

www.acmicpc.net

간단한 정렬문제다.

#include <iostream>
#include <algorithm>

using namespace std;

int arr[3];

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

	cin >> arr[0] >> arr[1] >> arr[2];
	sort(arr, arr + 3);
	cout << arr[0] << ' ' << arr[1] << ' ' << arr[2] << endl;
}

전체코드다.

728x90
반응형
Comments