PHƯỚC HƯNG OJ · THỬ THÁCH THUẬT TOÁN
#GL0000249. Tổng bội chung nhỏ nhất (LCM Sum)
HỌC THEO LỘ TRÌNH
1 lộ trìnhBài tập thuộc lộ trình
Mục lục đề ⌄
Đang đọc
Tổng bội chung nhỏ nhất (LCM Sum)
LCM Sum
Source: SPOJ
Version: Phuoc Hung OJ Extended
Problem Statement
Given a positive integer , calculate . Print the exact integer, without taking a modulus.
Input
Read one integer .
Output
Print the exact value .
Subtasks
- Subtask 1 (20 points): .
- Subtask 2 (30 points): .
- Subtask 3 (50 points): .
Examples
Example 1
Input
1
Output
1
Explanation
For , the least common multiples are 1, totaling 1.
Example 2
Input
2
Output
4
Explanation
For , the least common multiples are 2, 2, totaling 4.
Example 3
Input
5
Output
55
Explanation
For , the least common multiples are 5, 10, 15, 20, 5, totaling 55.