• 2024-06-04Leetcode 313. Super Ugly Number
    ProblemAsuperuglynumberisapositiveintegerwhoseprimefactorsareinthearrayprimes.Givenanintegernandanarrayofintegersprimes,returnthenthsuperuglynumber.Thenthsuperuglynumberisguaranteedtofitina32-bitsignedintege
  • 2024-05-15264 ugly number II 丑数
    问题描述Anuglynumberisapositiveintegerwhoseprimefactorsarelimitedto2,3,and5.Givenanintegern,returnthenth*uglynumber*.解释:一个丑数是一个正整数,其公因子只有2,3,5。给定数字n,求第n个丑数案例:Input:n=10Output:12Explanation:[1,2,
  • 2024-03-16C. Rudolf and the Ugly String
    题解遇到map时,sum++;遇到pie时,sum++。特殊情况遇到mapie时,sum--(因为map,pie分别加了一次,但是该子串只需要去掉p即可)code #include<bits/stdc++.h>usingnamespacestd;constintN=2e5+5;inta[N];intmain(){//freopen("input.txt","r",stdin);intt;ci
  • 2023-07-19LeetCode 1201. Ugly Number III 数学+二分答案
    Anuglynumberisapositiveintegerthatisdivisibleby\(a\),\(b\),or\(c\).Givenfourintegers\(n\),\(a\),\(b\),and\(c\),returnthe\(n\)thuglynumber.Solution考虑如何二分答案,假设一个函数\(f(num,a,b,c)\)会得到\([1,num]\)中uglynumb
  • 2022-12-05LeetCode: 313. Super Ugly Number
    LeetCode:313.SuperUglyNumberWriteaprogramtofindthenthsuperuglynumber.Superuglynumbersarepositivenumberswhoseallprimefactorsareinthegi
  • 2022-12-05LeetCode: 264. Ugly Number II
    LeetCode:264.UglyNumberII题目描述Writeaprogramtofindthen-thuglynumber.Uglynumbersarepositivenumberswhoseprimefactorsonlyinclude2,3,5.Ex
  • 2022-11-17the real ugly parts of PHP (ZZ)
    来源:https://www.amazon.com/gp/customer-reviews/R2D9T7KNTHFC5A IshouldwarnthereaderthatIneverwasaPHPenthousiastinspiteofbeingable,though,to