Nội dung Bài tập
- Mã:
- ABC171.BaiD
- Tên:
- ABC171.BaiD
- Dạng thi:
- oi
- Thang điểm:
- 100 điểm
- Giới hạn thời gian:
- 1 giây
- Giới hạn bộ nhớ:
- 256 MB
- Được tạo bởi:
- admin
Problem Statement
You have a sequence composed of positive integers: .
You will now successively do the following operations:
- In the -th operation, you replace every element whose value is with .
For each , find : the sum of all elements in just after the -th operation.
You have a sequence composed of positive integers: .
You will now successively do the following operations:
- In the -th operation, you replace every element whose value is with .
For each , find : the sum of all elements in just after the -th operation.
Constraints
- All values in input are integers.
- All values in input are integers.
Input
Input is given from Standard Input in the following format:
Quảng cáo
Input is given from Standard Input in the following format:
Quảng cáo
Theme :
Mời bạn soạn code
Ai có thể xem bài này :
Thông tin
Phần thảo luận