是判断自整除数的,这个我的结果是正确的,但是提交就有运行错误是怎么回事啊

#include
using namespace std;
int main()
{
int n;
int g=0, s=0, b=0, q=0;
cin >> n;
if (n >= 1000 && n < 9999)
{
q = n / 1000 % 10;
b = n / 100 % 10;
s = n / 10 % 10;
g = n % 10;
if (n % (g + s + b + q) == 0)
cout << "TRUE" << endl;
else
cout << "FALSE" << endl;
}
else if (n >= 100 && n < 1000)
{
b = n / 100 % 10;
s = n / 10 % 10;
g = n % 10;
if (n % (g+s+b) == 0)
cout << "TRUE" << endl;
else
cout << "FALSE" << endl;
}
else if (n >= 10 && n <= 99)
{
s = n / 10 % 10;
g = n % 10;
if (n % (g+s) == 0)
cout << "TRUE" << endl;
else
cout << "FALSE" << endl;
}
else
{
g = n % 10;
if (n % g == 0)
cout << "TRUE" << endl;
else
cout << "FALSE" << endl;
}

    system("pause");
return 0;

}

#include
你少贴了还是没写