20分求救

P1423 小玉在游泳

sorry ,忘了改变量d了,qwq已AC ``` #include <iostream> #include <cstring> #include <cmath> #include <algorithm> #include <iomanip> using namespace std; int main() { double s,d = 2,sum = 0; int cnt = 1; cin >> s; sum += d; while(sum < s) { d *= 0.98; sum += d; cnt++; } cout << cnt; return 0; } ```
by MuYuMC @ 2024-05-26 21:10:20


|