| Run ID | 作者 | 问题 | 语言 | 测评结果 | 时间 | 内存 | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 75619 | sh25_shenpy | 逛商场 | C++ | 通过 | 0 MS | 240 KB | 286 | 2025-12-08 17:24:27 |
#include<iostream> using namespace std; int s[101]; int main(){ int m,b=0,n; cin>>n; for(int i=0;i<n;++i){ cin>>s[i];} cin>>m; for(int ii=1;ii<n;++ii){ if(m>=s[ii]){ b++; m-=s[ii];} } cout<<b; return 0;}