Skip to content

Commit

Permalink
Add 17419.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
Hiyabye committed Jan 7, 2024
1 parent f7953ac commit 087ac2f
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions 17xxx/17419.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#include <iostream>
#include <string>
using namespace std;

void solve(void) {
int n; cin >> n;
string k; cin >> k;

int ans = 0;
for (char c : k) ans += c - '0';
cout << ans;
}

int main(void) {
ios::sync_with_stdio(false);
cin.tie(nullptr); cout.tie(nullptr);

solve();
return 0;
}

0 comments on commit 087ac2f

Please sign in to comment.