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

24608번 - Average Character 다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
1 초 (추가 시간 없음) 1024 MB33418616656.081%

문제

Have you ever wondered what the average ASCII character of any given string is? No? Never? Really? Well, is it a character in the string or something else?

Would you do this calculation by hand with an ASCII table? Probably not! All modern programming languages include functions for converting an ASCII character to an integer, and to convert an integer to an ASCII character. Of course, these functions often also handle unicode characters as well, but that is not part of this problem.

Given a string of ASCII characters, compute the average character. If the average character lies between two integer ASCII values, return the smaller one.

입력

The single line of input contains a single string $s$ (1ドル \le |s| \le 100$), which consists of ASCII text. All of the characters of $s$ will be printable ASCII, between ASCII 32ドル$ (space:' ') and ASCII 126ドル$ (tilde:'~'). It will NOT contain any control characters such as carriage returns, line feeds, tabs, etc. It is NOT guaranteed to begin, end, or even contain a non-space character.

출력

Output a single ASCII character, which is the average of all of the ASCII characters in $s$.

제한

예제 입력 1

ABCDE

예제 출력 1

C

예제 입력 2

AbCdE

예제 출력 2

O

예제 입력 3

aBcDe

예제 출력 3

V

힌트

출처

ICPC > Regionals > North America > South Central USA Regional > 2021 South Central USA Regional Contest > Division 2 A번

ICPC > Regionals > North America > Mid-Central Regional > Mid-Central USA Programming Contest 2021 A번

ICPC > Regionals > North America > Southeast USA Regional > 2021 Southeast USA Regional Programming Contest > Division 2 A번

  • 문제를 만든 사람: Howard Whitston
(追記) (追記ここまで)

출처

대학교 대회

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

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