Run ID 作者 问题 语言 测评结果 分数 时间 内存 代码长度 提交时间
102235 陈馨逸 换零钱2 C++ 解答错误 80 0 MS 240 KB 275 2023-09-12 14:00:33

Tests(8/10):


#include <bits/stdc++.h> using namespace std; int main() { int N,Q,M,s=0; cin>>N; if(N%10<5){ Q=N/10-1; } else{ Q=N/10; } if((N-10)%5>=1){ M=(N-10)/5; } else{ M=(N-10)/5-1; } for(int i=M;i>=0;i=i-2){ s=s+i; } cout<<s; return 0; }


测评信息: