我爱占星网 我爱占星网
首页
编程
java
php
前端
首页 编程 java php 前端

Largest prime factor

Problem Description
Everybody knows any number can be combined by the prime number.
Now, your task is telling me what position of the largest prime factor.
The position of prime 2 is 1, prime 3 is 2, and prime 5 is 3, etc.
Specially, LPF(1) = 0.

Input
Each line will contain one integer n(0 < n < 1000000).

Output
Output the LPF(n).

Sample Input
1
2
3
4
5

Sample Output
0
1
2
1
3

http://www.cnblogs.com/pingge/p/3190003.html

近期文章

  • How many prime numbers
  • 初学matlab,提问关于选择判断问题,已经画出流程图,有思路但语言不精通
  • c 计算器代码 排除字母
  • Difficulty control
  • To go or not to go
  • git服务器搭建的问题*****
  • JavaScript中table遍历列的求和
  • Java的抽象类中可以定义final方法吗?
  • C#导入Excel时,如何获取Excel表格中的分组信息
  • 如何不通过class id 获取标签中的文本
  • 如何在javascript中手动输入三个数,并判断能否构成三角形
  • Eclipse里的Papyrus里面的类图不会用
  • HashMap源码中的这四个个内部类的作用分别是什么?
  • c++ 如何把这段代码类改为类模板
  • 请解释下new Type[]{Object.class}什么意思
  • 使用一条sql查询两个表统计后的数据之和
  • Everyone is No.1
  • Tears of lonely star
  • hibernate一对一,一对多更新语句问题
  • R语言igraph包编写网络分析代码原理R语言igraph包编写网络分析代码原理和代码例子

Copyright ©2022 我爱占星 All Rights Reserved.

浙ICP备2022030071号-1

部分图文来自网络,如有侵犯您的版权,请告诉我们删除

友情链接:代码精华