시간 제한 메모리 제한 제출 정답 맞은 사람 정답 비율
1 초 128 MB 2942 2051 1865 71.075%

문제

상근이는 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+XHJcblx0XHVjMmYxXHVhZGZjXHVjNzc0XHVhYzAwIFx1YzIyYlx1Yzc5MCA1XHViOTdjIFx1YmNmYyBcdWI1NGMsIDVcdWI4NWMgXHViY2ZjIFx1YjU0Y1x1YjNjNCBcdWM3ODhcdWM5YzBcdWI5Y2MsIDZcdWM3M2NcdWI4NWMgXHVjNzk4XHViYWJiIFx1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ZW4gdHdvIG51bWJlcnMsIEEgYW5kIEIsIGNhbGN1bGF0ZSB0aGUgbWluaW11bSBhbmQgdGhlIG1heGltdW0gc3VtIFBlcmljYSBjb3VsZCBwb3NzaWJseSBnZXQuJm5ic3A7PFwvcD5cclxuIiwiaW5wdXQiOiI8cD5UaGUgZmlyc3QgYW5kIG9ubHkgbGluZSBvZiBpbnB1dCBjb250YWlucyBwb3NpdGl2ZSBpbnRlZ2VycyBBIGFuZCBCICgxICZsZTsgQSwgQiAmbGU7IDEgMDAwIDAwMCkuJm5ic3A7PFwvcD5cclxuXHJcbjxwPiZuYnNwOzxcL3A+XHJcbiIsIm91dHB1dCI6IjxwPkluIHNpbmdsZSBsaW5lIG9mIG91dHB1dCwgcHJpbnQgdHdvIHNwYWNlIHNlcGFyYXRlZCBpbnRlZ2VycywgbWluaW11bSBhbmQgbWF4aW11bSBzdW0gUGVyaWNhIGNvdWxkIGdldC4mbmJzcDs8XC9wPlxyXG4iLCJoaW50IjoiIiwib3JpZ2luYWwiOiIxIiwicHJvYmxlbV9sYW5nX2NvZGUiOiJcdWM2MDFcdWM1YjQifV0=

출처

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

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