首页 > ACM题库 > HDU-杭电 > hdu 2637 Easy Derivative 待解决[解题报告]C++
2014
02-12

hdu 2637 Easy Derivative 待解决[解题报告]C++

Easy Derivative

问题描述 :

You must be very familiar with derivative in math,and I guarantee that you can work out the derivative easily. Generally speaking,the last problem is the most difficult problem only a few can work out. However,it is not the case in this contest designed by Samuel. Give you 1 number n,and 2 extra numbers a and b you can work this problem out. For example,f(x)=ax^b,the 2 class derivative is f”=a*b*(b-1)x^(b-2),here n means n class. Here all the numbers are integers.

输入:

The input consists 2 parts:
test case number t,each of the test case contains 3 number n(n>=0),a,b(a,b will not be very large),the original one is like the format of f(x)=ax^b.

输出:

The input consists 2 parts:
test case number t,each of the test case contains 3 number n(n>=0),a,b(a,b will not be very large),the original one is like the format of f(x)=ax^b.

样例输入:

2
1 2 3
3 4 5 

样例输出:

6 
240