#21957: 記憶體區段錯誤!


smith990547@gmail.com (吳冠辰)


為什麼會這樣???

#include<iostream>
int fuction(int t)
{
	if(t<3)
		return 1;
	else
		return (fuction(t-3) + fuction(t-2) + fuction(t-1));
}
using namespace std;
int main()
{
	int x,d;
	cin >> x;
	d = fuction(x-1);
	d = d%10007;
	cout << d << '\n';
}