提交时间:2023-11-09 13:29:54
运行 ID: 109508
# include <iostream> using namespace std ; long double cf ( long double bse , long long pw ) { long double rst = 1 ; while ( pw > 0 ) { if ( pw % 2 == 1 ) { rst = rst * bse ; } pw /= 2 ; bse *= bse ; } return rst ; } int main ( ) { int a , b ; cin >> a >> b ; cout << cf ( a , b ) << endl ; return 0 ; }