Files
python/TangDou/XiTi/1016.cpp
HuangHai 1f397eca87 'commit'
2025-08-30 18:35:01 +08:00

17 lines
488 B
C++
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#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;
}