diff --git a/29xxx/29538.cpp b/29xxx/29538.cpp new file mode 100644 index 00000000..82ed63b3 --- /dev/null +++ b/29xxx/29538.cpp @@ -0,0 +1,25 @@ +#include +#include +#include +#include +using namespace std; + +void solve(void) { + int m, n, a; cin >> m >> n >> a; + vector w(n); + for (int i=0; i> w[i]; + + if (a >= 1000) { + cout << "Impossible\n"; + } else { + cout << fixed << setprecision(7) << (a * (m + accumulate(w.begin(), w.end(), 0))) / (1000.0 - a); + } +} + +int main(void) { + ios::sync_with_stdio(false); + cin.tie(nullptr); + + solve(); + return 0; +} \ No newline at end of file