시간 제한 메모리 제한 제출 정답 맞은 사람 정답 비율
1 초 128 MB 3303 2305 2106 71.414%

문제

상근이는 2863번에서 표를 너무 열심히 돌린 나머지 5와 6을 헷갈리기 시작했다.

싱근이가 숫자 5를 볼 때, 5로 볼 때도 있지만, 6으로 잘못 볼 수도 있고, 6을 볼 때는, 6으로 볼 때도 있지만, 5로 잘못 볼 수도 있다.

두 수 A와 B가 주어졌을 때, 상근이는 이 두 수를 더하려고 한다. 이때, 상근이가 구할 수 있는 두 수의 가능한 합 중, 최솟값과 최댓값을 구해 출력하는 프로그램을 작성하시오.

입력

첫째 줄에 두 정수 A와 B가 주어진다. (1 <= A,B <= 1,000,000)

출력

첫째 줄에 상근이가 구할 수 있는 두 수의 합 중 최솟값과 최댓값을 출력한다.

예제 입력 1

1430 4862

예제 출력 1

6282 6292
W3sicHJvYmxlbV9pZCI6IjI4NjQiLCJwcm9ibGVtX2xhbmciOiIwIiwidGl0bGUiOiI1XHVjNjQwIDZcdWM3NTggXHVjYzI4XHVjNzc0IiwiZGVzY3JpcHRpb24iOiJcclxuPHA+XHJcblx0XHVjMGMxXHVhZGZjXHVjNzc0XHViMjk0IDI4NjNcdWJjODhcdWM1ZDBcdWMxMWMgXHVkNDVjXHViOTdjIFx1YjEwOFx1YmIzNCBcdWM1ZjRcdWMyZWNcdWQ3ODggXHViM2NjXHViOWIwIFx1YjA5OFx1YmEzOFx1YzljMCA1XHVjNjQwIDZcdWM3NDQgXHVkNWY3XHVhYzA4XHViOWFjXHVhZTMwIFx1YzJkY1x1Yzc5MVx1ZDU4OFx1YjJlNC48XC9wPlxyXG5cclxuPHA+XHJcblx0XHVjMmYxXHVhZGZjXHVjNzc0XHVhYzAwIFx1YzIyYlx1Yzc5MCA1XHViOTdjIFx1YmNmYyBcdWI1NGMsIDVcdWI4NWMgXHViY2ZjIFx1YjU0Y1x1YjNjNCBcdWM3ODhcdWM5YzBcdWI5Y2MsIDZcdWM3M2NcdWI4NWMgXHVjNzk4XHViYWJiI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iB0d28gbnVtYmVycywgQSBhbmQgQiwgY2FsY3VsYXRlIHRoZSBtaW5pbXVtIGFuZCB0aGUgbWF4aW11bSBzdW0gUGVyaWNhIGNvdWxkIHBvc3NpYmx5IGdldC4mbmJzcDs8XC9wPlxyXG4iLCJpbnB1dCI6IjxwPlRoZSBmaXJzdCBhbmQgb25seSBsaW5lIG9mIGlucHV0IGNvbnRhaW5zIHBvc2l0aXZlIGludGVnZXJzIEEgYW5kIEIgKDEgJmxlOyBBLCBCICZsZTsgMSAwMDAgMDAwKS4mbmJzcDs8XC9wPlxyXG5cclxuPHA+Jm5ic3A7PFwvcD5cclxuIiwib3V0cHV0IjoiPHA+SW4gc2luZ2xlIGxpbmUgb2Ygb3V0cHV0LCBwcmludCB0d28gc3BhY2Ugc2VwYXJhdGVkIGludGVnZXJzLCBtaW5pbXVtIGFuZCBtYXhpbXVtIHN1bSBQZXJpY2EgY291bGQgZ2V0LiZuYnNwOzxcL3A+XHJcbiIsImhpbnQiOiIiLCJvcmlnaW5hbCI6IjEiLCJwcm9ibGVtX2xhbmdfY29kZSI6Ilx1YzYwMVx1YzViNCJ9XQ==

출처

Contest > Croatian Open Competition in Informatics > COCI 2010/2011 > Contest #3 2번

  • 문제를 번역한 사람: baekjoon
  • 문제의 오타를 찾은 사람: luke0201