#17519: 給延平的同仁 c++ AC


089487 (089487)


#include<bits/stdc++.h>
using namespace std;
int main()
{
int a,b,c,d;
int degree;
while(cin>>a>>b>>c>>d)
{
if(a==0&&b==0&&c==0&&d==0) break;
//if(a<b) degree+=40;
//if(b>c) degree+=40;
//if(d>c) degree+=40;
cout<<((a-b)+(c-b)+(c-d)+(a<b)*40+(b>c)*40+(d>c)*40)*9+720+360<<endl;
}
}

#17523: Re:給延平的同仁 c++ AC


ufve0704 (爬 我爬 我爬爬爬 有排行榜這種東西就是要爬 爬過我上面的那...)


#include<bits/stdc++.h>
using namespace std;
int main()
{
int a,b,c,d;
int degree;
while(cin>>a>>b>>c>>d)
{
if(a==0&&b==0&&c==0&&d==0) break;
//if(a<b) degree+=40;
//if(b>c) degree+=40;
//if(d>c) degree+=40;
cout<<((a-b)+(c-b)+(c-d)+(a<b)*40+(b>c)*40+(d>c)*40)*9+720+360<<endl;
}
}

這樣:

#include<bits/stdc++.h>

using namespace std;

int main(){

int a,b,c,d;

while(cin>>a>>b>>c>>d&&(a+b+c+d))

cout<<((a-b)+(c-b)+(c-d)+(a<b)*40+(b>c)*40+(d>c)*40)*9+720+360<<endl;

}