Run ID 作者 问题 语言 测评结果 分数 时间 内存 代码长度 提交时间
101534 曾煦翔 换零钱2 C++ 运行超时 60 1991 MS 240 KB 462 2023-09-09 10:13:33

Tests(6/10):


#include <iostream> #include <cstdio> using namespace std; int main() { //freopen("change.in" , "r",stdin); //freopen("change.out", "w",stdout); int a; cin >> a; int cnt = 0; if(a == 16) cout << 1; if(a > 16) { a -= 16; for(int i = 0;i <= a;i++) { for(int j = 0;j <= a / 5;j++) { for(int k = 0;k <= a / 10;k++) { if(i + j * 5 + k * 10 == a) cnt++; } } } } cout << cnt; return 0; }


测评信息: