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

33365번 - Password 다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
2 초 2048 MB63433465.385%

문제

After another leak of personal data, the administrator of Pochta.com decided to tighten the rules for employee passwords. Now, each employee's password must consist of exactly $n$ characters, and non-letter characters must occur among every three consecutive characters. Additional restriction is that the non-letter character must be present in the center of the password: one center character if $n$ is odd, or both characters closest to the center if $n$ is even.

For example, for $n = 9,ドル the following passwords are valid: "p4ss\#or0s", "1a2b34CD5". The password "1234a56bc" is not valid because the fifth character must be non-letter. The password "9ASE\#orkd" is not valid because it contains three letters in a row.

For $n = 6,ドル the passwords "ab23bc" and "5a428E" are valid. The passwords "111e11" and "4sy1um" are not valid.

The employees now wonder: what is the minimum and maximum number of non-letter characters that can occur in a password of a given length? Help them figure this out.

입력

The first line contains an integer $n$: the length of the password (1ドル \le n \le 1,000円,000円$).

출력

Output two integers separated by a space: the minimum and maximum number of non-letter characters in the password.

제한

예제 입력 1

1

예제 출력 1

1 1

예제 입력 2

2

예제 출력 2

2 2

예제 입력 3

3

예제 출력 3

1 3

힌트

출처

Camp > Petrozavodsk Programming Camp > Summer 2023 > Day 4: SPb SU Contest, LVII SPb SU Championship I번

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

출처

대학교 대회

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

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