Flowers

Time Limit: 1000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 3679    Accepted Submission(s): 2412

Problem Description
As you know, Gardon trid hard for his love-letter, and now he's spending too much time on choosing flowers for Angel. When Gardon entered the flower shop, he was frightened and dazed by thousands kinds of flowers. "How can I choose!" Gardon shouted out. Finally, Gardon-- a no-EQ man decided to buy flowers as many as possible. Can you compute how many flowers Gardon can buy at most?
 
Input
Input have serveral test cases. Each case has two lines. The first line contains two integers: N and M. M means how much money Gardon have. N integers following, means the prices of differnt flowers.
 
Output
For each case, print how many flowers Gardon can buy at most. You may firmly assume the number of each kind of flower is enough.
 
Sample Input
2 5
2 3
 
Sample Output
2
 #include <iostream>
using namespace std; int main(){
int n, m, num;
while(cin >> n >> m){
int min = ;
for(int i = ; i < n; i++){
cin >> num;
if(num < min)
min = num;
}
cout << m / min << endl;
}
return ;
}

最新文章

  1. jsp使用EL表达式回传boolean值出错的问题
  2. JQuery 添加节点
  3. hibernate注解随笔—10月8日
  4. select()函数 timval问题
  5. discuz 学习
  6. ZOJ 3872--解题报告
  7. Python3导入自定义模块的3种方式
  8. [Session] SessionHelper2---C#关于Session高级操作帮助类 (转载)
  9. Scrapy的shell命令(转)
  10. web02--jsp数据传递
  11. iOS开发之内存缓存机制
  12. SVG轨迹回放实践
  13. ionic2+Angular 依赖注入之Subject ——使用Subject来实现组件之间的通信
  14. oracle中“ORA-00060: 等待资源时检测到死锁” 或存储过程编译卡死 解决方法
  15. Android 访问地址
  16. python3编写网络爬虫18-代理池的维护
  17. AI创业的技术方案选择
  18. RabbitMQ在特来电的深度应用
  19. Java冒泡具体的原理,以及下标的变化
  20. Laravel中不可逆的加密方法

热门文章

  1. bzoj1266
  2. apache开源项目-- NiFi
  3. windows下rundll32介绍
  4. HDU4027 Can you answer these queries? 线段树
  5. Django学习随想(1)
  6. tomcat 服务器全解
  7. 现在再开发一个CMS系统还有市场吗?
  8. 使用CPU探查器优化XAML程序
  9. extjs Cannot read property &#39;dom&#39; of null
  10. Word恢复文本转换器-修复损坏的WORD文件