| Run ID | Author | Problem | Lang | Verdict | Score | Time | Memory | Code Length | Submit Time |
|---|---|---|---|---|---|---|---|---|---|
| 9506 | 贺昱翔 | 药房管理 | C++ | Accepted | 100 | 0 MS | 252 KB | 215 | 2020-11-14 17:30:55 |
#include<bits/stdc++.h> using namespace std; int main(){ int m,n,num,ans=0; cin>>m>>n; for(int i=1;i<=n;i++){ cin>>num; if(m>=num){ m-=num; }else{ ans++; } } cout<<ans; return 0; }