[Leetcode] 5279. Subtract the Product and Sum of Digits of an Integer
摘要:class Solution { public int subtractProductAndSum(int n) { int productResult = 1; int sumResult = 0; do { int currentval = n % 10; productResult *= currentval; sumResult += currentval; n /= 10; }while
阅读全文
posted @ 2019-12-08 11:42
浙公网安备 33010602011771号