题解 | 藻类植物
藻类植物
https://www.nowcoder.com/practice/624cee6440a644398df5bade13297f49
// #牛客春招刷题训练营# https://www.nowcoder.com/discuss/726480854079250432
// 模拟题
#include <iostream>
using namespace std;
int main() {
int last, x, r, d;
cin >> r >> d >> last;
int i = 0;
while(i < 10){
x = last * r -d;
last = x;
i++;
cout << (last < 0 ? 0 : last) << endl;//--------我不知道样例里面有没有但是建议加一个last<0的判断
}
return 0;
}
// 64 位输出请用 printf("%lld")
#写题解领奖励##牛客春招刷题训练营#