You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

17 lines
488 B

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

#include <bits/stdc++.h>
using namespace std;
int main() {
//第10天 10个
//第9天 20个 2份吃掉1份剩1份剩那份是10个吃掉的也是10个
//第8天 30个 3份吃掉1份剩2份吃掉的也是10个。
//第7天 40个 4份吃掉1份剩3份吃掉的也是10个就是每天吃10个
int sum = 0;
for (int i = 10; i > 0; i--) {
sum += 10;
}
cout << sum << endl;
return 0;
}