Skip to content

Commit

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

void solve(void) {
int l; cin >> l;
int r; cin >> r;

int ans = 0, exp = 1;
while (l * r / 100 > 5) {
l = l * r / 100;
ans += l * (1 << exp++);
}
cout << ans;
}

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

solve();
return 0;
}

0 comments on commit 25b3153

Please sign in to comment.