Run ID 作者 问题 语言 测评结果 时间 内存 代码长度 提交时间
56237 zhangweiran 分成整数 C++ 通过 0 MS 248 KB 447 2024-11-09 22:27:39

Tests(1/1):


#include<bits/stdc++.h> using namespace std; int main() { int N, ans = 0; cin >> N; for (int i = 1; i <= N; i++) { if(i == 3 || i == 7) continue; for (int j = i + 1; j <= N; j++) { if(j == 3 || j == 7) continue; for (int k = j + 1; k <= N; k++) { if(k == 3 || k == 7) continue; if(i + j + k != N) continue; //cout << i <<" "<<j <<" " <<" "<<k <<endl; ans++; } } } cout << ans; return 0; }


测评信息: