Logo
(追記) (追記ここまで)

6794번 - What is n, Daddy? 다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
2 초 512 MB141976770153.634%

문제

Natalie is learning to count on her fingers. When her Daddy tells her a number n (1 ≤ n ≤ 10), she asks “What is n, Daddy?”, by which she means “How many fingers should I hold up on each hand so that the total is n?”

To make matters simple, her Daddy gives her the correct finger representation according to the following rules:

  • the number may be represented on one or two hands;
  • if the number is represented on two hands, the larger number is given first.

For example, if Natalie asks “What is 4, Daddy?”, her Dad may reply:

  • 4 is 4.
  • 4 is 3 and 1.
  • 4 is 2 and 2.

Your job is to make sure that Natalie’s Daddy gives the correct number of answers.

입력

The input will be a single integer in the range 1..10.

출력

The output is the number of ways of producing that number on two hands, subject to the rules outlined above.

제한

예제 입력 1

4

예제 출력 1

3

힌트

출처

Olympiad > Canadian Computing Competition & Olympiad > 2010 > CCC 2010 Junior Division 1번

(追記) (追記ここまで)

출처

대학교 대회

  • 사업자 등록 번호: 541-88-00682
  • 대표자명: 최백준
  • 주소: 서울시 서초구 서초대로74길 29 서초파라곤 412호
  • 전화번호: 02-521-0487 (이메일로 연락 주세요)
  • 이메일: contacts@startlink.io
  • 통신판매신고번호: 제 2017-서울서초-2193 호

AltStyle によって変換されたページ (->オリジナル) /