题解 | #质数因子#
质数因子
http://www.nowcoder.com/practice/196534628ca6490ebce2e336b47b3607
package main
import "fmt"
func main() {
var input int64
fmt.Scan(&input)
var i int64
for i = 2; i * i <= input; i++ {
for input%i == 0 {
fmt.Printf("%d ", i)
input /= i
}
}
if input >= 2{
fmt.Println(input)
}
}