提交时间:2024-01-23 21:23:54
运行 ID: 125699
# include <bits/stdc++.h> using namespace std ; int nums [10] = { 6 , 2 , 5 , 5 , 4 , 5 , 6 , 3 , 7 , 6 } ; int main ( ) { int n , cnt = 0 ; cin >> n ; n -= 4 ; for ( int i = 0 ; i <= 9 ; i ++ ) { for ( int j = 0 ; j <= 9 ; j ++ ) { if ( nums [i] + nums [j] + nums [i + j] == n && i + j < 10 ) { cnt ++ ; // cout << i << " + " << j << " = " << i + j << endl ; } } } cout << cnt << endl ; return 0 ; }