Menu Close

Find the amount to pay for the electricity bill

The Electricity Officer has mentioned the total counts of unit and amount. The officer inform the customer the bill amount in a unique format. 
The format given by electricity officer as follow:
But customers are finding the difficult to find the exact amount that needs to be paid. 
Can you help the customers?

Functional Description:

Total Bill Amount = unitconsumed  ^ costperunit 

Input Format :
The first line of input represents the integer value of unitconsumed 
The second line of input represents the integer value of costperunit 

Output Format:
Print the total Bill amount in single line.
#include <stdio.h>
#include <math.h>
int main()
{
    int totalBillAmount;
    int unitconsumed;
    int costperunit;
    scanf("%d",&unitconsumed);
    scanf("%d",&costperunit);
    totalBillAmount=pow(unitconsumed,costperunit);
    printf("%d",totalBillAmount);
	return 0;
}

Input_1:
23
3

Output:
12167


Input_2:
19
5

Output:
2476099



Morae Q!