Hust oj 1384 Leyni, LOLI and Toasts(水题)
来源:互联网 发布:淘宝拓拨斯科技怎么样 编辑:程序博客网 时间:2024/05/18 04:00
Leyni likes to play with LOLIs, but this winter is so cold in Harbin!
A group of n LOLIs decided to buy b bottles of soft drink to make themselves warmer. Each bottle has d milliliters of the drink. Also they bought l limes and cut each of them into k slices. After that they found p grams of salt.
To make a toast, each LOLI needs x milliliters of the drink, a slice of lime and y grams of salt. Having the average materials, the LOLIs want to make toasts as many as they can. How many toasts can each LOLI makes?
InputThere are multiple test cases. The first line of input is an integer T indicating the number of test cases. Then T test cases follow.
For each test case:
Line 1. This line contains eight positive integers, n, b, d, l, k, p, x, y (1 ≤ n, b, d, l, k, p, x, y ≤ 1000). The numbers are separated by exactly one space.
OutputFor each test case:
Line 1. Output the number of toasts each LOLI can make.
Sample Input1
3 4 5 10 8 100 3 1
Sample Output2
#include<cstdio>#include<iostream>#include<cstring>#include<algorithm>using namespace std;int t;int n,b,d,l,k,p,x,y;int main(){ scanf("%d",&t); while(t--) { scanf("%d%d%d%d%d%d%d%d",&n,&b,&d,&l,&k,&p,&x,&y); printf("%d\n",min((b*d)/x,min(l*k,p/y))/n); }}
- Hust oj 1384 Leyni, LOLI and Toasts(水题)
- Hust oj 1104 Leyni, LOLI and Line(线段相交)
- leyni,loli,cap
- ACM-计算几何之Leyni, LOLI and Line——hrbust1104
- Hust oj 1369 Buy Computers(水题)
- Hust oj 2121 你猜猜(水题)
- Hust oj 2235 毒(水题)
- Hust oj 2125 钱多多(水题)
- Hust oj 1693 Difficult work(水题)
- Hust oj 2000 极差(水题)
- Hust oj 1720 Fibonacci Numbers(水题)
- Hust oj 1629 统计图(水题)
- Hust oj 1431 摞盘子(水题)
- Hust oj 1046 Balls Collision(水题)
- Hrbust 1390 Leyni, LOLI and Numbers【思维+树状数组+二分+双向链表模拟】好题!好题!好题!
- Hust oj 2084(大数)
- 哈理工OJ 1161 Leyni(线段树)
- Hust oj 1394 XianGe的游戏I(水题)
- 第一章 vagrant简介--Why Vagrant?(3)
- Python数据类型速记
- 数组基础知识
- 【NOIP2013提高组】火柴排队-逆序对
- MySQL 5.6 从零开始学 读后总结和感
- Hust oj 1384 Leyni, LOLI and Toasts(水题)
- Android 之 Picasso使用
- AOSP编译
- 浅谈Web自适应
- java学习之路 之 面向对象编程-数组
- Leetcode Set Matrix Zores
- Android Gradle manifestPlaceholders 的妙用
- NOI2016滚粗记
- Mybatis基础