Run ID 作者 问题 语言 测评结果 时间 内存 代码长度 提交时间
78252 sh25_shengmy 药房管理 C++ 通过 0 MS 248 KB 279 2025-12-26 15:31:57

Tests(1/1):


#include <bits/stdc++.h> using namespace std; int main() { int y,n,b,cnt=0; cin>>y>>n; for(int i=0;i<n;i++){ cin>>b; if(y>=b){ y-=b; } else{ cnt++; } } cout<<cnt; return 0; }


测评信息: