fork(1) download
  1. #include <stdio.h>
  2.  
  3. int power(int base, int z) {
  4. int result=1;
  5. for(int i=0;i<z;i++) {
  6. result*=base;
  7. }
  8. return result;
  9. }
  10.  
  11. int func(int x, int y, int z) {
  12. return power(x,z)+power(y,z);
  13. }
  14.  
  15. int main(void) {
  16. int x,y,z;
  17. scanf("%d %d %d",&x,&y,&z);
  18.  
  19. printf("%d\n",func(x,y,z));
  20.  
  21. return 0;
  22. }
Success #stdin #stdout 0s 5308KB
stdin
6 5 2
stdout
61