fork download
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. int x,y;
  6.  
  7. int main(){
  8. // freopen("input.txt", "r", stdin);
  9. // freopen("output.txt", "w", stdout);
  10.  
  11. cin >> x >> y;
  12. cout << 1+(x-1)*(y-1);
  13.  
  14. return 0;
  15. }
Success #stdin #stdout 0s 544KB
stdin
2 3
stdout
3