333

wc083 2025-03-15 11:49:32 6

#include <bits/stdc++.h>

using namespace std;

int w[] = { 0, 1, 2, 3, 5, 10, 20 };

int a[10], b[1007] = { 0 };

int main() {

for (int i = 1; i <= 6; i++) cin >> a[i];

for (int i = 0; i <= a[1]; i++) {

    for (int j = 0; j <= a[2]; j++) {

        for (int k = 0; k <= a[3]; k++) {

            for (int p = 0; p <= a[4]; p++) {

                for (int q = 0; q <= a[5]; q++) {

                    for (int r = 0; r <= a[6]; r++) {

                        b[i * w[1] + j * w[2] + k * w[3] + p * w[4] + q * w[5] + r * w[6]] = 1;

                    }

                }

            }

        }

    }

}

int ans = 0;

for (int i = 1; i <= 1000; i++) {

    ans += b[i];

}

cout << "Total=" << ans;

return 0;

}

{{ vote && vote.total.up }}