Hdu 5268 (BestCoder Round #44 A)

简介:

http://acm.hdu.edu.cn/showproblem.php?pid=5268
简单水题:
只给出代码:

#include <iostream>
#include <algorithm>
using namespace std;
int main()
{
    int T,a,b;
    cin>>T;
    for(int k=1; k<=T; k++)
    {
        int sum,ans=0;
        for(int i=2; i<=5; i++)
        {
            cin>>a>>b;
            sum=2*i*(250-a)-50*b;
            ans+=max(sum,(int)(0.4*i*500));
        }
        cout<<"Case #"<<k<<": "<<ans<<endl;
    }
    return 0;
}
目录
相关文章
Codeforces Round #434 (Div. 2, based on Technocup 2018 Elimination Round 1)&&Codeforces 861A k-rounding【暴力】
A. k-rounding time limit per test:1 second memory limit per test:256 megabytes input:standard input output:standard output ...
1244 0
Codeforces Round #434 (Div. 2, based on Technocup 2018 Elimination Round 1)&&Codeforces 861B Which floor?【枚举,暴力】
B. Which floor? time limit per test:1 second memory limit per test:256 megabytes input:standard input output:standard output...
1315 0
|
人工智能 Java