| ||||||||||
| Online Judge | Problem Set | Authors | Online Contests | User | ||||||
|---|---|---|---|---|---|---|---|---|---|---|
| Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest | |||||||||
Re:水个短代码In Reply To:水个短代码 Posted by:602651749 at 2019-09-26 15:57:24 > #include <iostream>
> using namespace std;
> int main(){
> int a,s,d,f,g,r;
> while(1){
> cin>>a>>s>>d>>f>>g>>r;
> if(a+s+d+f+g+r==0) break;
> r+=g+f+(d+3)/4;
> a-=11*g;
> s-=5*f;
> if(g=d%4){
> s-=7-2*g;
> a-=8-g;
> }
> if(s>0){
> r+=(s+8)/9;
> a-=4*(9-(s%9));
> } else a+=4*s;
> if(a>0) r+=(a+35)/36;
> cout<<r<<endl;
> }
> }
Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator