标签:nbsp sizeof big bsp span code += break memset
1 int t; 2 string a, b; 3 int m[maxn; 4 5 void BigInteger_subtract(string a, string b) { 6 memset(m, 0, sizeof(m)); 7 int len = a.size(); 8 for(int i = len - 1; i >= 0; i--) { 9 b += a[i]; 10 } 11 if(b > a) { 12 string c = b; 13 b = a; 14 a = c; 15 } 16 t = 0; 17 for(int i = len - 1; i >= 0; i--) { 18 m[t] += a[i] - b[i]; 19 if(m[t] < 0) { 20 m[t] += 10; 21 m[t + 1]--; 22 } 23 t++; 24 } 25 for(int i = t; i >= 0; i--) { 26 if(m[i] != 0) { 27 t = i + 1; 28 break; 29 } 30 } 31 }
标签:nbsp sizeof big bsp span code += break memset
原文地址:https://www.cnblogs.com/Dillonh/p/8909039.html