fork download
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. int main() {
  6. long long A, B, C, D;
  7. cin >> A >> B >> C >> D; // Read the four numbers
  8.  
  9. // Extract the last two digits of each number
  10. int a_last = A % 100;
  11. int b_last = B % 100;
  12. int c_last = C % 100;
  13. int d_last = D % 100;
  14.  
  15. // Calculate the product of the last two digits
  16. int product_last_two = (a_last * b_last) % 100;
  17. product_last_two = (product_last_two * c_last) % 100;
  18. product_last_two = (product_last_two * d_last) % 100;
  19.  
  20. // Print the result
  21. cout << product_last_two << endl;
  22.  
  23. return 0;
  24. }
Success #stdin #stdout 0s 5288KB
stdin
Standard input is empty
stdout
0