怀疑B题答案有误
查看原帖
怀疑B题答案有误
1103824
Bricks0411楼主2024/3/17 17:36
#include<iostream>
using namespace std;
int ans=0;
void func(int num, int score) {
	if(score==70) {
		ans++;
	}
	if(score==100||num>30) {
		return;
	}
	func(num+1,score+10);
	func(num+1,0);
}
int main() {
	func(1,0);
	cout << ans << endl;
	system("pause");
	return 0;
}

暴力搜出来答案是8335366,但是答案是4开头的数字

2024/3/17 17:36
加载中...