public class Solution {
public int SubtractProductAndSum(int n) {
int sum=0;
int ji=1;
while(n>0){
int num=n%10;
sum+=num;
ji*=num;
n/=10;
}
return ji-sum;
}
}
标签:10,1281,int,sum,public,积和之差,num,ji,leetcode
From: https://blog.csdn.net/zhourongxiang1/article/details/139402156