leetcode之丑数
题目描述:给你一个整数 n ,请你判断 n 是否为 丑数 。如果是,返回 true ;否则,返回 false 。
丑数 就是只包含质因数 2、3 和/或 5 的正整数。
链接
leetcode每日一题之丑数代码如下
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849// Javaclass Solution { public boolean isUgly(int num) { if(num == 0) return false; while(num != 1){ if(num%2==0){ num/=2; continue; } if(num%3= ...
Hello World
Welcome to Hexo! This is your very first post. Check documentation for more info. If you get any problems when using Hexo, you can find the answer in troubleshooting or you can ask me on GitHub.
Quick StartCreate a new post1$ hexo new "My New Post"
More info: Writing
Run server1$ hexo server
More info: Server
Generate static files1$ hexo generate
More info: Generating
Deploy to remote sites1$ hexo deploy
More info: Deployment