fork download
  1. #include <stdio.h>
  2.  
  3. int proceed(int a, int b, int t){
  4. int res = a*20 + b*21;
  5. if (t > res)res = t;
  6. return res;
  7. }
  8.  
  9. int main(void){
  10. int i, j;
  11. int t = 0;
  12. for(i = 26; i<55; i++){
  13. for(j = 26; j<55; j++){
  14. if(i*i + j*j == 3364){t = proceed(i, j, t);}
  15. }
  16. }
  17. printf("%d", t);
  18. return 0;
  19. }
Success #stdin #stdout 0s 4988KB
stdin
Standard input is empty
stdout
1682