ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#215407 | #996. 换零钱 | Program01_SanSan | Compile Error | / | / | C++ | 610b | 2024-12-07 09:58:34 | 2024-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;
}
Details
answer.code: In function 'int main()': answer.code:7:13: error: 'nullptr' was not declared in this scope cin.tie(nullptr);\x0d ^