fork download
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. int main()
  6. {
  7. int n, res = 0;
  8.  
  9. cin >> n;
  10.  
  11. for(int q=0; q<10; q++)
  12. for(int w=0; w<10; w++)
  13. {
  14. int t = n - q - w;
  15. res += t >= 0 && t <= 9;
  16. }
  17.  
  18. cout << res * res << endl;
  19.  
  20. return 0;
  21. }
Success #stdin #stdout 0s 3472KB
stdin
24
stdout
100