fork download
  1. #include <bits/stdc++.h>
  2. #define ull unsigned long long
  3. #define ll long long
  4. #define el endl
  5. #define nl '\n'
  6. using namespace std;
  7.  
  8. void input()
  9. {
  10. if (fopen("in.txt", "r"))
  11. {
  12. freopen("in.txt", "r", stdin);
  13. freopen("out.txt", "w", stdout);
  14. }
  15. }
  16.  
  17. int power(int x, int y)
  18. {
  19. // x -> m
  20. // y -> n
  21. int rslt = 1;
  22. for (int i = 1; i <= y; i++)
  23. {
  24. rslt *= x;
  25. }
  26. return rslt;
  27. }
  28. int main()
  29. {
  30. input();
  31. int m, n;
  32. cin >> m >> n;
  33. // m -> base
  34. // n -> power
  35.  
  36. cout << power(m, n) << nl;
  37. return 0;
  38. }
  39. // 1
Success #stdin #stdout 0.01s 5312KB
stdin
Standard input is empty
stdout
0