Welcome   HUNAN NORMAL UNIVERSITY ACM/ICPC Judge Online
Home
FAQs
Problem Set
Practices
Online Contests
Major Exercises
OI Special
Judgement
Submit
Online Status
User Ranklist
Users
Register new
Login
Web Links
Hunan Normal University
College of Information Science and Engineering
分解素因子
Time Limit: 1000ms, Special Time Limit:2500ms, Memory Limit:32768KB
Total submit users: 165, Accepted users: 153
Problem 10002 : No special judgement
Problem description
  假设x是一个正整数,它的值不超过65535(即1 < x≤65535),请编写一个程序,将x分解为若干个素数的乘积。

Input
  输入的第一行含一个正整数k (1≤k≤10),表示测试例的个数,后面紧接着k行,每行对应一个测试例,包含一个正整数x。

Output
  每个测试例对应一行输出,输出x的素数乘积表示式,式中的素数从小到大排列,两个素数之间用“*”表示乘法。

Sample Input
2
11
9828
Sample Output
11
2*2*3*3*3*7*13
Submit   Clarifications   Judge Status  Problems  Ranklist 

HUNAN NORMAL UNIVERSITY ACM/ICPC Judge Online, Version 2010.5.5.final.
Web visits:2095 today,16258822 total, since 2010-05-07