PHƯỚC HƯNG OJ · THỬ THÁCH THUẬT TOÁN
#GL0000016. Làm giá trị tròn nhất (Make It Round)
HỌC THEO LỘ TRÌNH
1 lộ trìnhBài tập thuộc lộ trình
Mục lục đề ⌄
Đang đọc
Làm giá trị tròn nhất (Make It Round)
Make It Round
Source: Codeforces
Version: Phuoc Hung OJ Extended
Problem Statement
Choose integer with and form . Maximize the number of trailing decimal zeros; among ties, maximize the product itself. Print the optimal product.
Input
One line containing .
Output
Print the optimal value .
Subtasks
- Subtask 1 (20 points):
- Subtask 2 (30 points):
- Subtask 3 (50 points):
Examples
Input
10 6
Output
60
Explanation
Every ends in at least one zero. No permitted yields two trailing zeros, so gives the largest product .