UVA10339 Watching Watches
题目大意:有两个表,每天都会慢一点时间,给出每天慢得秒数,问下一次重合的时刻。
解题思路:时刻重合也就是说整整差了一周,一周是12小时,用12小时的秒数除以两个表的相差那就是需要多少天的时间后重合,知道了需要多少天*每一天某个表走的时间(注意要减去少走的时间)即使答案,化成时间的格式即可,注意0时显示成12时。
#include<bits/stdc++.h> using namespace std; int main() { int m, c, h, t1, t2; double t3; long long n; while(~scanf("%d%d",&t1,&t2)) { if(t1==t2) { printf("%d %d 12:00\n",t1,t2); continue; } c=abs(t1-t2); t3=12.0*3600.0/c; *-t1); n %=; m=n/; n%=; ) m++; h=m/; m%=; ) h=; printf("%d %d %02d:%02d\n",t1,t2,h,m); } ; }
UVA10339 Watching Watches的更多相关文章
- Uva 10339 - Watching Watches【数论,暴力】
题目链接:10339 - Watching Watches 题意:两个时钟,一个每天慢a秒,一个每天慢b秒,问两钟重新相遇的时刻 1圈有12 * 60 * 60秒,然后1圈 / abs(a - b), ...
- UVA - 10339-Watching Watches
10339 - Watching Watches Time limit: 3.000 seconds It has been said that a watch that is stopped kee ...
- Zookeeper 监视(Watches) 简介(转)
Zookeeper C API 的声明和描述在 include/zookeeper.h 中可以找到,另外大部分的 Zookeeper C API 常量.结构体声明也在 zookeeper.h 中,如果 ...
- Codeforces Round #219 (Div. 1) C. Watching Fireworks is Fun
C. Watching Fireworks is Fun time limit per test 4 seconds memory limit per test 256 megabytes input ...
- Codeforces Round #219 (Div. 2) E. Watching Fireworks is Fun
http://codeforces.com/contest/373/problem/E E. Watching Fireworks is Fun time limit per test 4 secon ...
- 6656 Watching the Kangaroo
6656 Watching the KangarooDay by day number of Kangaroos is decreasing just liketiger, whale or lion ...
- Error watching file for changes: EMFILE
运行reactnative项目时在编译过程中报错 Error watching file for changes: EMFILE 故障原因: 是升级后watchman不可用了,需要重装watchman ...
- Listen error 错误和 limit of inotify watches was reached
今天在生产环境中报错rails c中报了一个错误: FATAL: Listen error: unable to monitor directories for changes. Visit http ...
- Containerpilot 配置文件 之 Watches
watch是在consul进行监视的服务配置. watch轮询服务的状态,并在服务变得健康,变得不健康或者实例数量发生变化时发出事件. 请注意,watch不包括行为; watch只发出事件,以便job ...
随机推荐
- R12 供应商SQL
-- 供应商主表数据: SELECT ass.vendor_id vendor_id, ass.party_id party_id, ass.segment1 vendor_code, ass.ven ...
- 有关git的换行符的处理问题
签入签出时对换行符的操作: #签出时将LF转换为CRLF,签入时将CRLF转换为LF git config --global core.autocrlf true #签出时不转换,签入时转换为LF g ...
- SQL Server session故障排查
--根据作业名 查找session id select a.spid,a.blocked,b.name,substring(replace(a.PROGRAM_NAME,'SQLAgent - TSQ ...
- 【crunch bang】文件管理器-thunar
Thunar拥有的实用功能: 缩略图查看 批量重命名 安装: $ sudo apt-get install thunar 加速thunar启动速度 sudo leafpad /usr/share/gv ...
- 项目发布时候出错--项目文件包含 ToolsVersion="12.0"
项目文件包含 ToolsVersion="12.0".此工具集可能未知或缺失(您可以通过安装相应版本的 MSBuild 来解决该问题),或者该生成因策略原因已被强制更改为特殊 To ...
- iOS 学习笔记 十三 (2015.04.15)采用第三方库,实现ios录音转为amr
1.第三方开源库地址 https://github.com/guange2015/ios-amr 2.参考博客地址 http://blog.csdn.net/windsoul85/article/de ...
- Linux设备模型(9)_device resource management ---devm申请空间【转】
转自:http://www.wowotech.net/linux_kenrel/device_resource_management.html . 前言 蜗蜗建议,每一个Linux驱动工程师,都能瞄一 ...
- Axure简介
Axure RP(Rapid Prototyping快速原型) 是美国公司Axure Software Solution公司旗舰产品,是一个专业的快速原型设计工具,让负责定义需求和规格.设计功能和界面 ...
- html5 canvas 笔记二(添加样式和颜色)
色彩 Colors fillStyle = color 设置图形的填充颜色. strokeStyle = color 设置图形轮廓的颜色. 透明度 Transparency globalAlpha = ...
- Linux系统中为php添加pcntl扩展的方法
1.首先看下 phpize命令 所在的目录 (ps:我的目录/usr/bin/phpize)如果没有找到的话 执行安装yum install php53_devel (ps:请注意自己的版本) 安装 ...