C语言用数组模拟除法
int main()
//{
//char arr[1000] = { "0" };
//long long x = 0;
//int ch[1000] = { 0 };
//int ch1[100] = { 0 };
//scanf("%s %lld", arr, &x);
//int i = 0;
//int n = 0;
//int sz = strlen(arr);
//for (i = 1; i < sz + 1; ++i)
//{
//ch[i] = arr[i - 1] - '0';
//}
//for (i = 0; i < sz + 1; i++)
//{
// 核心算法
//ch1[i] = (n * 10 + ch[i]) / x;
//if (ch1[i] == 0)
//{
//n = ch[i];
//}
//else
//{
//n = n * 10 + ch[i] - ch1[i] * x;
//if ((n * 10 + ch[i] - (ch1[i] * x)) == 0)
//break;
//}
//}
//i = 1;
//while (ch1[i] == 0 && i < sz + 1)
//{
//i++;
//}
//int j = 0;
//for (j = i; j < sz + 1; j++)
//{
//printf("%d", ch1[j]);
//}
//return 0;
//}