F.A.Q
Hand In Hand
Online Acmers
Problem Archive
Realtime Judge Status
Authors Ranklist
 
     C/C++/Java Exams     
ACM Steps
Go to Job
Contest LiveCast
ICPC@China
Best Coder beta
VIP | STD Contests
    DIY | Web-DIY beta
Author ID 
Password 
 Register new ID

Up-up

Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)
Total Submission(s): 2053    Accepted Submission(s): 589


Problem Description
The Up-up of a number a by a positive integer b, denoted by a¡ü¡üb, is recursively defined by:
a¡ü¡ü1 = a,
a¡ü¡ü(k+1) = a (a¡ü¡ük)
Thus we have e.g. 3¡ü¡ü2 = 33 = 27, hence 3¡ü¡ü3 = 327= 7625597484987 and 3¡ü¡ü4 is roughly 103.6383346400240996*10^12
The problem is give you a pair of a and k,you must calculate a¡ü¡ük ,the result may be large you can output the answer mod 100000000 instead
 

Input
A pair of a and k .a is a positive integer and fit in __int64 and 1<=k<=200
 

Output
a¡ü¡ük mod 100000000
 

Sample Input
3 2 3 3
 

Sample Output
27 97484987
 

Source
 

Statistic | Submit | Discuss | Note
Hangzhou Dianzi University Online Judge 3.0
Copyright © 2005-2024 HDU ACM Team. All Rights Reserved.
Designer & Developer : Wang Rongtao LinLe GaoJie GanLu
Total 0.000000(s) query 1, Server time : 2024-04-19 21:25:23, Gzip enabled