#include<iostream>
#include<stdio.h>
#include<algorithm>
using namespace std; int main()
{
//freopen("acm.acm","r",stdin);
int min_ele(int a,int b);
//copy(istream_iterator<int>(cin),istream_iterator<int>(),back_inserter(coll));
int a,b,c,d;
while(cin>>a>>b>>c>>d)
{
if(!a&&!b&&!c&&!d)
break; if(a > b)
swap(a,b);
if(c > d)
swap(c,d);
if(a <= c && b <= d)
{
cout<<<<"%"<<endl;
}
else
{
cout<<min_ele(int(double(c)/double(a)*),int(double(d)/double(b)*));
cout<<"%"<<endl;
}
}
}
int min_ele(int a,int b)
{
if(a > b)
return b;
else
return a;
}

POJ 2707的更多相关文章

  1. Poj 2707 Copier Reduction

    1.Link: http://poj.org/problem?id=2707 2.Content: Copier Reduction Time Limit: 1000MS   Memory Limit ...

  2. poj和hdu部分基础算法分类及难度排序

    最近想从头开始刷点基础些的题,正好有个网站有关于各大oj的题目分类(http://www.pythontip.com/acm/problemCategory),所以写了点脚本把hdu和poj的一些题目 ...

  3. POJ 3370. Halloween treats 抽屉原理 / 鸽巢原理

    Halloween treats Time Limit: 2000MS   Memory Limit: 65536K Total Submissions: 7644   Accepted: 2798 ...

  4. POJ 2356. Find a multiple 抽屉原理 / 鸽巢原理

    Find a multiple Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 7192   Accepted: 3138   ...

  5. POJ 2965. The Pilots Brothers' refrigerator 枚举or爆搜or分治

    The Pilots Brothers' refrigerator Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 22286 ...

  6. POJ 1753. Flip Game 枚举or爆搜+位压缩,或者高斯消元法

    Flip Game Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 37427   Accepted: 16288 Descr ...

  7. POJ 3254. Corn Fields 状态压缩DP (入门级)

    Corn Fields Time Limit: 2000MS   Memory Limit: 65536K Total Submissions: 9806   Accepted: 5185 Descr ...

  8. POJ 2739. Sum of Consecutive Prime Numbers

    Sum of Consecutive Prime Numbers Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 20050 ...

  9. POJ 2255. Tree Recovery

    Tree Recovery Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 11939   Accepted: 7493 De ...

随机推荐

  1. jQuery Growl插件(消息提醒)

    ps:菜鸟教程 <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <s ...

  2. boost-使用property_tree来解析xml、json

    property_tree是一个保存了多个属性值的树形数据结构,可以用来解析xml.json.ini.info文件.要使用property_tree和xml解析组件的话需要包含"boost/ ...

  3. extern声明全局变量用法

    在类之外声明一个成员变量,如: a.h CString name; class a{ }; a.cpp extern CString name; 然后就可以用name这个成员变量了. b.cpp ex ...

  4. C++之输出100-200内的素数

    素数(质数)    除了1和它本身以外不再被其他的除数整除. // 输出100--200内的素数 #include<iostream> using namespace std; int m ...

  5. JDK 1.5、1.6 & 中文版API,J2EE5API大全(借鉴)

    个人分类: Java文档           Sun 公司提供的Java API Docs是学习和使用Java语言中最经常使用的参考资料之一.但是长期以来此文档只有英文版,对于中国地区的Java开发者 ...

  6. 关于WEB前端,你必须了解的发展方向

    一.职业方向定位 首先,只有确定好自己的职业方向,才能做好职业规划.在我看来,做WEB前端技术能够找到的职业方向有以下几种: (1)资深WEB前端工程师 这个方向算是一个WEB前端最基本的选择了,在国 ...

  7. javase jdk 环境变量 涵义

    jdk环境变量配置:path:jdk安装所在目录下的bin路径-->因为环境变量path下放置的是操作系统执行的.exe文件,jdk中bin中放的是可执行的.exe文件,所以要把这个路径放置到p ...

  8. BT1120时序,可以用于自测用

    module bt1120_gen #( , , , , , )( input clk, input rst_p, // input [5:0] h_sync_pixcels, // input [5 ...

  9. MIT molecular Biology 笔记11 位点特异性重组 和 DNA转座

    位点特异性重组 和 DNA转座 视频 https://www.bilibili.com/video/av7973580/ 教材 Molecular biology of the gene 7th ed ...

  10. maven依赖管理

    maven依赖管理 1.依赖范围   (依赖相当于java中的import  是否需要导入别的jar包) 使用控制依赖与三种classpath(编译期,测试时期,运行时期)的关系 complie    ...