fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main()
  5. {
  6. int N, c = 0;
  7. cin >> N;
  8.  
  9. for ( int i = 0; i < 10; i++)
  10. {
  11. for( int j = 0; j < 10; j++)
  12. {
  13. if( N - i - j >= 0 && N - i - j < 10 )
  14. { c++; }
  15. }
  16. }
  17. cout << c*c;
  18. return 0;
  19. }
Success #stdin #stdout 0s 3460KB
stdin
10
stdout
3969