博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
hdu 5982(16青岛现场赛)Relic Discovery水题
阅读量:4207 次
发布时间:2019-05-26

本文共 1618 字,大约阅读时间需要 5 分钟。

Relic Discovery

Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/65536 K (Java/Others)
Total Submission(s): 1027    Accepted Submission(s): 830


Problem Description
Recently, paleoanthropologists have found historical remains on an island in the Atlantic Ocean. The most inspiring thing is that they excavated in a magnificent cave and found that it was a huge tomb. Inside the construction,researchers identified a large number of skeletons, and funeral objects including stone axe, livestock bones and murals. Now, all items have been sorted, and they can be divided into N types. After they were checked attentively, you are told that there are 
Ai  items of the i-th type. Further more, each item of the i-th type requires 
Bi  million dollars for transportation, analysis, and preservation averagely. As your job, you need to calculate the total expenditure.
 

Input
The first line of input contains an integer T which is the number of test cases. For each test case, the first line contains an integer N which is the number of types. In the next N lines, the i-th line contains two numbers 
Ai  and 
Bi  as described above. All numbers are positive integers and less than 101.
 

Output
For each case, output one integer, the total expenditure in million dollars.
 

Sample Input
121 23 4
 

Sample Output
14
 

Source
 

Recommend
jiangzijing2015   |   We have carefully selected several similar problems for you:            
 

 |   |   | 

int main(){    int T;    cin>>T;    while(T--)    {        int n;        cin>>n;        int x,y;        ll ans=0;        while(n--)        {            cin>>x>>y;            ans+=x*y;        }        cout<
<

转载地址:http://aeali.baihongyu.com/

你可能感兴趣的文章
解决Github代码下载慢问题!
查看>>
1.idea中Maven创建项目及2.对idea中生命周期的理解3.pom文件夹下groupId、artifactId含义
查看>>
LeetCode-栈|双指针-42. 接雨水
查看>>
stdin,stdout,stderr详解
查看>>
Linux文件和设备编程
查看>>
文件描述符
查看>>
终端驱动程序:几个简单例子
查看>>
登录linux密码验证很慢的解决办法
查看>>
fcntl函数总结
查看>>
HTML条件注释
查看>>
Putty远程服务器的SSH经验
查看>>
内核态与用户态
查看>>
使用mingw(fedora)移植virt-viewer
查看>>
趣链 BitXHub跨链平台 (4)跨链网关“初介绍”
查看>>
C++ 字符串string操作
查看>>
MySQL必知必会 -- 了解SQL和MySQL
查看>>
MySQL必知必会 -- 使用MySQL
查看>>
MySQL必知必会 -- 数据检索
查看>>
MySQL必知必会 -- 排序检索数据 ORDER BY
查看>>
MySQL必知必会 -- 数据过滤
查看>>