int my_atoi(const char* p){
assert(p != NULL);
bool neg_flag = false;// 符号标记
int res = 0;// 结果
if(p[0] == '+' || p[0] == '-')
neg_flag = (*p++ != '+');
while('0'<= *p&& *p<= '9') res = res*10 + (*p++ - '0');
return neg_flag ?0 -res : res; }