From c63fde47f08f877e157f5e0c974105e1603e157e Mon Sep 17 00:00:00 2001 From: Jihoon Lee Date: Thu, 13 Jun 2024 14:03:46 +0900 Subject: [PATCH] Add 24608.cpp --- 24xxx/24608.cpp | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 24xxx/24608.cpp diff --git a/24xxx/24608.cpp b/24xxx/24608.cpp new file mode 100644 index 00000000..00bda674 --- /dev/null +++ b/24xxx/24608.cpp @@ -0,0 +1,22 @@ +#include +#include +using namespace std; + +inline int c2i(char c) { return c; } +inline char i2c(int i) { return i; } + +void solve(void) { + string s; getline(cin, s); + + int ans = 0; + for (char c : s) ans += c2i(c); + cout << i2c(ans / s.length()); +} + +int main(void) { + ios::sync_with_stdio(false); + cin.tie(nullptr); + + solve(); + return 0; +} \ No newline at end of file