some programs!!

This commit is contained in:
rogerwang2008 committed 2026-09-28 14:05:06 +08:00
1 parent ed054247d5
commit 71f1022dea
38 files changed
+1037 -281

No files matched your search

+23
View File
@@ -0,0 +1,23 @@
#include <iostream>
using namespace std;
long long exchange_requirement, empty_bottles_amount, filled_bottles_amount, ans;
int main() {
ios::sync_with_stdio(false);
cin.tie(nullptr);
cin >> exchange_requirement >> filled_bottles_amount;
while (true) {
ans += filled_bottles_amount;
empty_bottles_amount += filled_bottles_amount;
filled_bottles_amount = empty_bottles_amount / exchange_requirement;
empty_bottles_amount %= exchange_requirement;
if (filled_bottles_amount == 0) { break; }
}
cout << ans << endl;
return 0;
}