直接模拟就行。
#include<bits/stdc++.h> using namespace std; int main(){ int a,b,p,q,m; cin>>a>>b>>p>>q>>m; cout<<a*p+b*q<<endl<<m-a*p-b*q; return 0; }
暂无评论