Skip to content

Commit

Permalink
Add 32327.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
Hiyabye committed Oct 15, 2024
1 parent b41c71a commit 12a7801
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions 32xxx/32327.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#include <iostream>
#include <vector>
using namespace std;

void solve(void) {
int d; cin >> d;

vector<int> v; int x;
while (cin >> x) v.push_back(x);
for (int x : v) {
if (d <= x) break;
d += x;
}
cout << d;
}

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

solve();
return 0;
}

0 comments on commit 12a7801

Please sign in to comment.