UOJ Logo

NOI.AC

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#215407#996. 换零钱Program01_SanSanCompile Error//C++610b2024-12-07 09:58:342024-12-07 09:58:36

answer

#include <bits/stdc++.h>
using namespace std;
int n, m, ans;
int main()
{
    ios::sync_with_stdio(false);
    cin.tie(nullptr);
    cout.tie(nullptr);
    cin >> n >> m;
    for (int i = 1; i <= m; i++)
        for (int j = 1; j <= m - i; j++)
            for (int k = 1; k <= m - i - j; k++)
                for (int l = 1; l <= m - i - j - k; l++)
                {
                    if (i + j + k + l != m)
                        continue;
                    if (i * 10 + j * 5 + k * 2 + l * 1 == n)
                        ans++;
                }
    cout << ans;
    return 0;
}

详细

answer.code: In function 'int main()':
answer.code:7:13: error: 'nullptr' was not declared in this scope
     cin.tie(nullptr);\x0d
             ^