UVA_10300:Ecological Premium
Sample Input
3
5
1 1 1
2 2 2
3 3 3
2 3 4
8 9 2
3
9 1 8
6 12 1
8 1 1
3
10 30 40
9 8 5
100 1000 70
Sample Output
38
86
7445
Language:C++ 4.8.2 PS:该题光是理解题意就花费了我足足一个小时,原以为读过几章TIJ,英文就怎么怎么第了,结果碰到硬茬还是...囧rz
#include<stdio.h>
int main(void)
{
int n, m, size, num_animal, environment, sum;
scanf("%d", &n);
while(n--)
{
sum = 0;
scanf("%d", &m);
while(m--)
{
scanf("%d%d%d", &size, &num_animal, &environment); sum += size * environment; // 由题意,result为size/num_animal*environment*num_animal;
} printf("%d\n", sum);
} return 0;
}
UVA_10300:Ecological Premium的更多相关文章
- 10300 - Ecological Premium
Problem A Ecological Premium Input: standard input Output: standard output Time Limit: 1 second Memo ...
- Ecological Premium - UVa10300
欢迎访问我的新博客:http://www.milkcu.com/blog/ 原文地址:http://www.milkcu.com/blog/archives/uva10300.html 题目描述 Pr ...
- UVa 10300 - Ecological Premium
https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=94&page=s ...
- Ecological Premium
#include<bits/stdc++.h> using namespace std; int main() { int n,m; unsigned long long int a,b, ...
- UVA题目分类
题目 Volume 0. Getting Started 开始10055 - Hashmat the Brave Warrior 10071 - Back to High School Physics ...
- UVa OJ 10300
Problem A Ecological Premium Input: standard input Output: standard output Time Limit: 1 second Memo ...
- 【索引】Volume 0. Getting Started
AOAPC I: Beginning Algorithm Contests (Rujia Liu) Volume 0. Getting Started 10055 - Hashmat the Brav ...
- 数据库管理工具GUI - PremiumSoft Navicat Premium Enterprise 11.2.15 x86/x64 KEY
转载自: 数据库管理工具GUI - PremiumSoft Navicat Premium Enterprise 11.2.15 x86/x64 KEY Navicat Premium(数据库管理工具 ...
- mysql 5.7 的安装配置与 navicat premium for mysql 11 的破解使用
再安装mysql5.7 或以上的版本出现了一些问题,现在总结下,希望能给初入学习mysql的人一下帮助,大牛就不要来嘲笑小弟我了 首先准备如下: 1.下载mysql 5.7,下载地址:https:// ...
随机推荐
- qq邮箱html邮件,图片不显示的问题
测试无论是站外的图片还是站内的图片,qq邮箱都会过滤图片,导致显示不出来. 解决办法:图片base64编码.效果图: 代码: <div class="container"&g ...
- Math concepts / 数学概念
链接网址:Math concepts / 数学概念 – https://www.codelast.com/math-concepts-%e6%95%b0%e5%ad%a6%e6%a6%82%e5%bf ...
- mockito问题集
使用PowerMockRunner.class,不能在测试类中使用IntStream.rang()
- union 和order by 使用时排序不正确
静态专题和APP版专题(order by不起作用): [query] sql=(select sp_f13577,sp_f13576 from sp_t113 where url_1 not like ...
- CodeChef--Cards, bags and coins
题目链接 Yet another game from chef. Chef gives you N cards and M bags. Each of the N cards has an integ ...
- mybatis深入理解(八)-----关联表查询
一.一对一关联 1.1.提出需求 根据班级id查询班级信息(带老师的信息) 1.2.创建表和数据 创建一张教师表和班级表,这里我们假设一个老师只负责教一个班,那么老师和班级之间的关系就是一种一对一的关 ...
- 大量的Close_wait 发现的 too many open file 错
突然频繁出现大量的 Close_wait,查看程序日志,发现 connection 在 accept 时报错,Too many open file. 估计程序里有这个漏洞,当 accept 时报错,没 ...
- DjangoORM查询、分页、ckeditor
查询数据 Django的批量查询(查询所有,或者条件查询)返回的是queryset对象. Queryset对象是一个惰性对象,在不执行 1.排序 2.循环 3.截取 操作的情况下,不会遍历序列的内容. ...
- 常用命令6--文件搜索命令4-grep
查找不包含size字符串的文件.
- PHP通过sql生成CSV文件并下载,PHP实现文件下载
/** * PHP通过sql生成CSV文件并下载 * @param string $sql 查询sql,结果为二维数组 * @param array $title 数据,CSV文件标题 * @para ...