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

17 lines
488 B
C++
Raw 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;
}