MCPcopy Create free account
hub / github.com/E869120/math-algorithm-book / main

Function main

codes/cpp/Code_5_10_3.cpp:6–25  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4long long N, X, Y;
5
6int main() {
7 // ����
8 cin >> N >> X >> Y;
9
10 // 4 �‚̐��� (a, b, c, d) �̑S�T�� �� �����̏o��
11 for (int a = 1; a <= N; a++) {
12 for (int b = a; b <= N; b++) {
13 for (int c = b; c <= N; c++) {
14 for (int d = c; d <= N; d++) {
15 if (a + b + c + d == X && 1LL * a * b * c * d == Y) {
16 cout << "Yes" << endl;
17 return 0; // �v���O�����̎��s���I��������
18 }
19 }
20 }
21 }
22 }
23 cout << "No" << endl; // 1 �‚����‚���Ȃ������� No
24 return 0;
25}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected