fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. int minMN = 0, maxMN = 0, threeRaiseMin = 1, FiveRaiseMax = 1;
  6. int m, n, i, j;
  7. cout << "give m and n:" << endl;
  8. cin >>m>>n;
  9. for(i = m, j = n; ((i >= 0)||(j >= 0)); i--, j--){
  10. if((i >= 1)&&(j >= 1)){
  11. minMN++;
  12. threeRaiseMin *= 3;
  13. }
  14. maxMN++;
  15. FiveRaiseMax *=5;
  16. }
  17. cout << FiveRaiseMax << endl;
  18. cout << threeRaiseMin << endl;
  19. return 0;
  20. }
Success #stdin #stdout 0s 16048KB
stdin
42
52
stdout
give m and n:
-1208458123
1914644777