fork download
  1. #include <bits/stdc++.h>
  2. using namespace std;
  3.  
  4. int main() {
  5. double a;
  6. long long int b;
  7. double pot=1;
  8. cin>>a>>b;
  9. if(a==0)
  10. if(b<=0) cout<<"-1";
  11. else cout<<0;
  12. else if(a==1){
  13. cout<<1;
  14.  
  15. }
  16. else{
  17. for(int i=0;i<b;i++){
  18. pot*=a;
  19.  
  20. }
  21. cout<<fixed<<pot;
  22. }
  23. return 0;
  24. }
Success #stdin #stdout 0.65s 5280KB
stdin
Standard input is empty
stdout
0.000000