Conductors(水题)
Conductors
Background
Problem
Input
Output
Example
| input | output |
|---|---|
13 |
15 |
Notes
#include <stdio.h>
#include <math.h> int main()
{
double p,q;
double l,r;
while (scanf("%lf%lf",&p,&q)!=EOF)
{
for (int i=;i<=;i++)
{
l=i*p/;
r=i*q/;
int L=floor(l);
int R=floor(r);
if (R-L>=&&fabs(l-L)>1e-&&fabs(r-R)>1e-)
{
printf("%d\n",i);
break;
}
}
}
return ;
}
Conductors(水题)的更多相关文章
- HDOJ 2317. Nasty Hacks 模拟水题
Nasty Hacks Time Limit: 3000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Tota ...
- ACM :漫漫上学路 -DP -水题
CSU 1772 漫漫上学路 Time Limit: 1000MS Memory Limit: 131072KB 64bit IO Format: %lld & %llu Submit ...
- ytu 1050:写一个函数,使给定的一个二维数组(3×3)转置,即行列互换(水题)
1050: 写一个函数,使给定的一个二维数组(3×3)转置,即行列互换 Time Limit: 1 Sec Memory Limit: 128 MBSubmit: 154 Solved: 112[ ...
- [poj2247] Humble Numbers (DP水题)
DP 水题 Description A number whose only prime factors are 2,3,5 or 7 is called a humble number. The se ...
- gdutcode 1195: 相信我这是水题 GDUT中有个风云人物pigofzhou,是冰点奇迹队的主代码手,
1195: 相信我这是水题 Time Limit: 1 Sec Memory Limit: 128 MBSubmit: 821 Solved: 219 Description GDUT中有个风云人 ...
- BZOJ 1303 CQOI2009 中位数图 水题
1303: [CQOI2009]中位数图 Time Limit: 1 Sec Memory Limit: 162 MBSubmit: 2340 Solved: 1464[Submit][Statu ...
- 第十一届“蓝狐网络杯”湖南省大学生计算机程序设计竞赛 B - 大还是小? 字符串水题
B - 大还是小? Time Limit:5000MS Memory Limit:65535KB 64bit IO Format: Description 输入两个实数,判断第一个数大 ...
- ACM水题
ACM小白...非常费劲儿的学习中,我觉得目前我能做出来的都可以划分在水题的范围中...不断做,不断总结,随时更新 POJ: 1004 Financial Management 求平均值 杭电OJ: ...
- CF451C Predict Outcome of the Game 水题
Codeforces Round #258 (Div. 2) Predict Outcome of the Game C. Predict Outcome of the Game time limit ...
随机推荐
- 一起学Netty(一)之 Hello Netty
一起学Netty(一)之 Hello Netty 学习了:https://blog.csdn.net/linuu/article/details/51306480
- android项目 之 记事本(13) ----- 查看图片及播放录音
本文是自己学习所做笔记,欢迎转载.但请注明出处:http://blog.csdn.net/jesson20121020 今天就来实现下查看图片及录音的功能,在编辑或者浏览记事时,点击图片.打开一个自己 ...
- 如何Tomcat注册成系统服务
1.开始->运行(windos+r)中敲cmd,DOS界面2.cd到tomcat的bin目录下3.运行命令service.bat install 这里可以指定注册服务的名字,然后就可以 ...
- VENOM cve-2015-3456 Qemu 虚拟机逃逸漏洞POC
#include <sys/io.h> int main() { int i ; iopl(3); outb(0x8e, 0x3f5); outb(0x41, 0x3f5); outb(0 ...
- Unity3D 中脚本执行的先后顺序
Unity3D本身自带有控制脚本执行先后顺序的方法: Edit ---> Project Settings ---> Script Execution Order ---> 值越小 ...
- S2:外观模式 Facade
为子系统中的一组接口提供一个一致的界面,此模式定义了一个高层接口,这个接口使得这一子系统更加容易使用. 什么时候使用:1,开发阶段,子系统越来越复杂,增加外观模式提供一个简单的调用接口.2,维护一个大 ...
- eclipse maven tools.jar找不到y也就是在这个
Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.3.2:compile (default-compile ...
- js控制div内的滚动条的位置
通过div的scrollTop变动控制垂直滚动条位置. 通过div的scrollLeft变动控制水平滚动条位置. 示例: <body> //d1是外层div,带滚动条 <div id ...
- pomodoro源码
有网友问我要pomodoro源码.事实上这个程序非常easy,仅仅是定时器,定时弹出置顶窗体.用c++builder6.0写.放一个TPopupMenu 右键菜单,一个TTrayIcon 一个托盘图标 ...
- MvcPager 分页示例 — 应用CSS样式
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 @model PagedList<string> <h5>Digg style:</h5> ...