![]() | ||||
Online Judge | Problem Set | Authors | Online Contests | User |
---|---|---|---|---|
Web Board Home Page F.A.Qs Announcement | Current Contest Past Contests Scheduled Contests Award Contest |
Birthday Cake Time Limit:5000MS Memory Limit:65536K
Prince Remmarguts helped Uyuw successfully hold a concert in our
previous story (POJ 2451), and ...that was the day of Uyuw's birthday. You should read the number of test cases Z (Z <= 30) in the first line. Each of the following lines denotes a single test case, consisting of two integers N and M. We guarantee that 1 <= N <= 10 ^ 41 and 3 <= M <= 100. OutputOutput one line per test case, showing the total volume of that cake. We also guarantee that the volume is less than 10 ^ 250. Sample Input
POJ Monthly--2005.07.31, Zeyuan Zhu |
[Submit] [Go Back] [Status] [Discuss]
All Copyright Reserved 2003-2005 Ying Fuchen,Xu Pengcheng
Any problem, Please Contact Administrator