整数的各位积和之差
2025-4-20
| 2025-4-20
Words 241Read Time 1 min
type
status
date
slug
summary
tags
category
icon
password
给你一个整数 n,请你帮忙计算并返回该整数「各位数字之积」与「各位数字之和」的差。
PS:写这种题有利于发量的恢复
来源:力扣(LeetCode) 链接:https://leetcode-cn.com/problems/subtract-the-product-and-sum-of-digits-of-an-integer 著作权归领扣网络所有。商业转载请联系官方授权,非商业转载请注明出处。
示例 1:
示例 2:
提示:
  • 1 <= n <= 10^5

代码:

结果:

notion image
image-20220126120901945
斐波那契数数组的三角和-中等
Loading...