Phân tích thừa số nguyên tố

View as PDF

Submit solution

Points: 100.00 (partial)
Time limit: 1.0s
Memory limit: 1G
Input: stdin
Output: stdout

Author:
Problem type
Allowed languages
C, C++, GAS64, Pascal, Perl, PHP, Python, Sed, TCL, Text

Phân tích n (n <= 103) ra thành các thừa số nguyên tố.

Input:

1 dòng duy nhất là số n ( n <= 103)

Output:

In ra các thừa số nguyên tố theo thứ tự tăng dần liên tiếp không cách.

Example Input 1 :
Copy
10
Example Output 1:
Copy
25
Example Input 2:
Copy
12
Example Output 2:
Copy
223

Giải thích :

  • 10 có dạng thừa số nguyên tố là 2 x 5 nên ta in ra 25.
  • 12 có dạng thừa số nguyên tố là 2 x 2 x 3 nên ta in ra 223.

Comments

Please read the guidelines before commenting.



  • 0
    NoobCpp  commented 3:46:58 am, 06/11/2024 edit 2

    My Solution

    https://ideone.com/UftMDY → Click


  • -1
    anhtuan2007  commented 9:47:48 am, 05/09/2022

    iloveamelia