Skip to content

Commit

Permalink
Add 24608.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
Hiyabye committed Jun 13, 2024
1 parent 0c27a2d commit c63fde4
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions 24xxx/24608.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#include <iostream>
#include <string>
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;
}

0 comments on commit c63fde4

Please sign in to comment.