fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. long long int calculate_area(long long int N, long long int K, long long int L) {
  5. // The area of the union of the squares is equal to the area of the largest square
  6. long long int area = (N * K + L) * (N * K + L);
  7. return area;
  8. }
  9.  
  10. int main() {
  11. long long int N, K, L;
  12. cin >> N >> K >> L;
  13.  
  14. long long int area = calculate_area(N, K, L);
  15. cout << area << endl;
  16. return 0;
  17. }
Success #stdin #stdout 0.01s 5288KB
stdin
4 1 2
stdout
36