LeetCode—258. 各位相加
#include <stdio.h>#include <stdlib.h>#include <string.h>int addDigits(int num) { char a[100]; int i,sum=0; //itoa(num,a,10); sprintf(a,"%d",num); int l