1281. 整数的各位积和之差bahttps://leetcode.cn/problems/subtract-the-product-and-sum-of-digits-of-an-integer/
| 2023-8-12
0  |  阅读时长 0 分钟
Date
Aug 9, 2023
need_review
need_review
type
undo
undo
难度
简单
给你一个整数 n,请你帮忙计算并返回该整数「各位数字之积」与「各位数字之和」的差。
示例 1:
示例 2:
提示:
  • 1 <= n <= 10^5

解法1
先分开再计算
notion image
简化一下
notion image
  • Giscus
目录