Run ID 作者 问题 语言 测评结果 分数 时间 内存 代码长度 提交时间
102310 陈馨逸 换零钱2 C++ 通过 100 0 MS 248 KB 288 2023-09-13 13:13:37

Tests(10/10):


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


测评信息: