提交时间:2023-08-24 16:33:47
运行 ID: 100082
#include<bits/stdc++.h> using namespace std; int main(){ int a[10] = {6,2,5,5,4,5,6,3,7,6}; int n; scanf("%d",&n); int cnt = 0; for(int i = 0;i < 10;i++){ for(int j = 0;j < 10;j++){ if(a[i] + a[j] + a[i+j] == n-4){ cnt++; } } } printf("%d",cnt); return 0; }