| Run ID | Author | Problem | Lang | Verdict | Time | Memory | Code Length | Submit Time |
|---|---|---|---|---|---|---|---|---|
| 53076 | 张思存 | 药房管理 | C++ | Accepted | 0 MS | 244 KB | 326 | 2024-10-18 15:09:30 |
#include<bits/stdc++.h> using namespace std; int main() { int all, wawawa = 0, n; cin >> all >> n; for(int i=1;i<=n;i++){ int wanted; cin>>wanted; if(all < wanted){ wawawa+=1; }else{ all -= wanted; } } cout<<wawawa; return 0; }