提交时间:2024-05-03 09:09:22
运行 ID: 46287
#include <bits/stdc++.h> using namespace std; int main(){ int n, cnt = 0; cin >> n; for(int i = 1; i < n; i++){ for(int j = 1; j < n; j++){ for(int k = 1; k < n; k++){ if(i < j && i < k && i != 3 && i != 7 && j < k && j != 3 && j != 7 && k!= 3 && k != 7 && i + j + k == n){ cnt++; } } } } cout << cnt; return 0; }