| Run ID | Author | Problem | Lang | Verdict | Score | Time | Memory | Code Length | Submit Time |
|---|---|---|---|---|---|---|---|---|---|
| 48481 | 石利伟 | 小旗手 | C++ | Wrong Answer | 0 | 0 MS | 260 KB | 404 | 2022-07-15 21:31:13 |
#include<bits/stdc++.h> using namespace std; int main(){ int n,k; char wy; string cz; cin>>n>>wy>>k>>cz; for(int i=0;i<cz.size();i++){ if(cz[i]=='a'){ if(n*k>=1000)n=n*k-1000; else n*=k; } else if(cz[i]=='b'){ if(n+k>=1000)n-=1000; else n+=k; } else if(cz[i]=='c'){ if(n-k<0)n=n; else n-=k; } else if(cz[i]=='d')n/=k; } cout<<n; return 0; }