小明上学(CCF认证2018-12-1 )
Posted shallow-dream
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了小明上学(CCF认证2018-12-1 )相关的知识,希望对你有一定的参考价值。
#include<bits/stdc++.h> using namespace std; int main() int red,yellow,green,N,a,b,ans=0; cin>>red>>yellow>>green>>N; while(~scanf("%d%d",&a,&b)) if(a==0||a==1) ans+=b; else if(a==2) ans+=b+red; cout<<ans<<endl; return 0;
以上是关于小明上学(CCF认证2018-12-1 )的主要内容,如果未能解决你的问题,请参考以下文章