시간 제한 메모리 제한 제출 정답 맞은 사람 정답 비율
1 초 128 MB 3841 2526 2288 66.628%

문제

캥거루 세 마리가 사막에서 놀고 있다. 사막에는 수직선이 하나 있고, 캥거루는 서로 다른 한 좌표 위에 있다.

한 번 움직일 때, 바깥쪽의 두 캥거루 중 한 마리가 다른 두 캥거루 사이의 정수 좌표로 점프한다. 한 좌표 위에 있는 캥거루가 두 마리 이상일 수는 없다.

캥거루는 최대 몇 번 움직일 수 있을까?

입력

첫째 줄에 세 캥거루의 초기 위치 A, B, C가 주어진다. (0 < A < B < C < 100)

출력

캥거루가 최대 몇 번 움직일 수 있는지 출력한다.

예제 입력 1

3 5 9

예제 출력 1

3
W3sicHJvYmxlbV9pZCI6IjI5NjUiLCJwcm9ibGVtX2xhbmciOiIwIiwidGl0bGUiOiJcdWNlYTVcdWFjNzBcdWI4ZTggXHVjMTM4XHViOWM4XHViOWFjIiwiZGVzY3JpcHRpb24iOiI8cD5cdWNlYTVcdWFjNzBcdWI4ZTggXHVjMTM4IFx1YjljOFx1YjlhY1x1YWMwMCBcdWMwYWNcdWI5YzlcdWM1ZDBcdWMxMWMgXHViMTgwXHVhY2UwIFx1Yzc4OFx1YjJlNC4gXHVjMGFjXHViOWM5XHVjNWQwXHViMjk0IFx1YzIxOFx1YzljMVx1YzEyMFx1Yzc3NCBcdWQ1NThcdWIwOTggXHVjNzg4XHVhY2UwLCBcdWNlYTVcdWFjNzBcdWI4ZThcdWIyOTQgXHVjMTFjXHViODVjIFx1YjJlNFx1Yjk3OCBcdWQ1NWMgXHVjODhjXHVkNDVjIFx1YzcwNFx1YzVkMCBcdWM3ODhcdWIyZTQuPFwvcD5cclxuXHJcbjxwPlx1ZDU1YyBcdWJjODggXHVjNmMwXHVjOWMxXHVjNzdjIFx1YjU0YywgXHViYzE0XHVhZTY1XHVjYWJkXHVjNzU4IFx1YjQ1MCBcdWNlYTVcdWFjNzBcdWI4ZTggXHVjOTExIFx1ZDU1YyBcdWI5YzhcdWI5YWNc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ViNCJ9LHsicHJvYmxlbV9pZCI6IjI5NjUiLCJwcm9ibGVtX2xhbmciOiIxIiwidGl0bGUiOiJTS09DSU1JUyIsImRlc2NyaXB0aW9uIjoiPHA+VGhyZWUga2FuZ2Fyb29zIGFyZSBwbGF5aW5nIGluIHRoZSBkZXNlcnQuIFRoZXkgYXJlIHBsYXlpbmcgb24gYSBudW1iZXIgbGluZSwgZWFjaCBvY2N1cHlpbmcgYSBkaWZmZXJlbnQgaW50ZWdlci4gSW4gYSBzaW5nbGUgbW92ZSwgb25lIG9mIHRoZSBvdXRlciBrYW5nYXJvb3MganVtcHMgaW50byB0aGUgc3BhY2UgYmV0d2VlbiB0aGUgb3RoZXIgdHdvLiBBdCBubyBwb2ludCBtYXkgdHdvIGthbmdhcm9vcyBvY2N1cHkgdGhlIHNhbWUgcG9zaXRpb24uJm5ic3A7PFwvcD5cclxuXHJcbjxwPkhlbHAgdGhlbSBwbGF5IGFzIGxvbmcgYXMgcG9zc2libGUuJm5ic3A7PFwvcD5cclxuIiwiaW5wdXQiOiI8cD5UaHJlZSBpbnRlZ2VycyBBLCBCIGFuZCBDICgwICZsdDsgQSAmbHQ7IEIgJmx0OyBDICZsdDsgMTAwKSwgdGhlIGluaXRpYWwgcG9zaXRpb25zIG9mIHRoZSBrYW5nYXJvb3MuJm5ic3A7PFwvcD5cclxuXHJcbjxwPiZuYnNwOzxcL3A+XHJcbiIsIm91dHB1dCI6IjxwPk91dHB1dCB0aGUgbGFyZ2VzdCBudW1iZXIgb2YgbW92ZXMgdGhlIGthbmdhcm9vcyBjYW4gbWFrZS4mbmJzcDs8XC9wPlxyXG5cclxuPHA+Jm5ic3A7PFwvcD5cclxuIiwiaGludCI6IiIsIm9yaWdpbmFsIjoiMSIsInByb2JsZW1fbGFuZ19jb2RlIjoiXHVjNjAxXHVjNWI0In1d

출처

Contest > Croatian Open Competition in Informatics > COCI 2008/2009 > Contest #1 1번

  • 문제를 번역한 사람: baekjoon
  • 어색한 표현을 찾은 사람: Qwaz