Leetcode-cn.com 2022-02-10
🟡 1447.simplified-fractions
🏷️ Tags
#math #string #number_theory
Description
给你一个整数
Example
🟡 1447.simplified-fractions
🏷️ Tags
#math #string #number_theory
Description
给你一个整数
n ,请你返回所有 0 到 1 之间(不包括 0 和 1)满足分母小于等于 n 的 最简 分数 。分数可以以 任意 顺序返回。Example
输入:n = 2
输出:["1/2"]
解释:"1/2" 是唯一一个分母小于等于 2 的最简分数。
Leetcode-cn.com 2022-03-03
🟢 258.add-digits
🏷️ Tags
#math #number_theory #simulation
Description
给定一个非负整数
Example
🟢 258.add-digits
🏷️ Tags
#math #number_theory #simulation
Description
给定一个非负整数
num,反复将各个位上的数字相加,直到结果为一位数。返回这个结果。Example
输入: num = 38
输出: 2
解释: 各位相加的过程为:
38 --> 3 + 8 --> 11
11 --> 1 + 1 --> 2
由于 2 是一位数,所以返回 2。
1799.maximize-score-after-n-operations.pdf
74.8 KB
leetcode.cn 2022-12-22
🔴1799.maximize-score-after-n-operations
🏷️ Tags
#bit_manipulation #array #math #dynamic_programming #backtracking #bitmask #number_theory
🔴1799.maximize-score-after-n-operations
🏷️ Tags
#bit_manipulation #array #math #dynamic_programming #backtracking #bitmask #number_theory
1819.number-of-different-subsequences-gcds.pdf
83.5 KB
leetcode.cn 2023-01-14
🔴1819.number-of-different-subsequences-gcds
🏷️ Tags
#array #math #counting #number_theory
🔴1819.number-of-different-subsequences-gcds
🏷️ Tags
#array #math #counting #number_theory