[CodePlus2017]晨跑
Time Limit: 10 Sec Memory Limit: 512 MB
Submit: 166 Solved: 125
Description
Input
Output
Sample Input
Sample Output
HINT
来自 CodePlus 2017 11 月赛,清华大学计算机科学与技术系学生算法与竞赛协会 荣誉出品。
Credit:idea/何昊天 命题/何昊天 验题/卢政荣
Git Repo:https://git.thusaac.org/publish/CodePlus201711
本次比赛的官方网址:cp.thusaac.org
感谢腾讯公司对此次比赛的支持。
思路
GCD;
代码实现
#include<cstdio>
#define LL long long
LL x,y,z;
LL gcd(LL x,LL y){return x%y==?y:gcd(y,x%y);}
int main(){
scanf("%lld%lld%lld",&x,&y,&z);
y=(y*z)/gcd(y,z);
x=(x*y)/gcd(x,y);
printf("%lld\n",x);
return ;
}
[CodePlus2017]晨跑的更多相关文章
- bzoj5105: [CodePlus2017]晨跑(LCM)
5105: [CodePlus2017]晨跑 题目:传送门 题解: 没有很懂Code Puls 的操作...一道签到的三个数的LCM??? 代码: #include<cstdio> #in ...
- BZOJ5105 CodePlus2017晨跑
这个题???我WA了两发??? #include<iostream> #include<cstdio> #include<cmath> #include<cs ...
- BZOJ5105: [CodePlus2017]晨跑
[传送门:BZOJ5105] 简要题意: 给出a,b,c,求a,b,c的最小公倍数 题解: 直接搞(最近刷水题有点心态爆炸) 参考代码: #include<cstdio> #include ...
- 1877: [SDOI2009]晨跑
1877: [SDOI2009]晨跑 Time Limit: 4 Sec Memory Limit: 64 MBSubmit: 2007 Solved: 1085[Submit][Status][ ...
- C++之路进阶——codevs2306(晨跑)
2306 晨跑 2009年省队选拔赛山东 时间限制: 1 s 空间限制: 256000 KB 题目等级 : 大师 Master 题目描述 Description Elaxia最近迷恋 ...
- 晨跑(bzoj 1877)
Description Elaxia最近迷恋上了空手道,他为自己设定了一套健身计划,比如俯卧撑.仰卧起坐等 等,不过到目前为止,他坚持下来的只有晨跑. 现在给出一张学校附近的地图,这张地图中包含N个十 ...
- BZOJ-1877 晨跑 最小费用最大流+拆点
其实我是不想做这种水题的QWQ,没办法,剧情需要 1877: [SDOI2009]晨跑 Time Limit: 4 Sec Memory Limit: 64 MB Submit: 1704 Solve ...
- 【BZOJ】1877: [SDOI2009]晨跑(最小费用最大流)
http://www.lydsy.com/JudgeOnline/problem.php?id=1877 费用流做多了,此题就是一眼题. 拆点表示只能经过一次,容量为1,费用为0. 然后再连边即可,跑 ...
- BZOJ 1877: [SDOI2009]晨跑 费用流
1877: [SDOI2009]晨跑 Description Elaxia最近迷恋上了空手道,他为自己设定了一套健身计划,比如俯卧撑.仰卧起坐等 等,不过到目前为止,他坚持下来的只有晨跑. 现在给出一 ...
随机推荐
- 页面html图片按钮多种写法
原地址:http://blog.163.com/weison_hi/blog/static/17680404720118534033788/ 第一种: 在一般情况下按钮提交表单: <form i ...
- python实战之爬取喜玛拉雅专辑信息
import urllib.request import json from lxml import etree url='http://www.ximalaya.com/dq/8.ajax' hea ...
- CF962E Byteland, Berland and Disputed Cities
思路: http://codeforces.com/blog/entry/58869. 实现: #include <bits/stdc++.h> using namespace std; ...
- Java Web MVC实例
开发环境 Eclipse Java EE IDE for Web Developers. Version: Luna Service Release 2 (4.4.2) tomcat:7.0 数据库: ...
- nginx 访问localhost老是下载文件不能打开网页什么情况?
nginx打开网页直接下载文件的问题 nginx sites-available文件里的default已经修改过root 路径了. 但是访问localhost的时候总是直接下载网页而不是打开网址 很奇 ...
- 打开centos直接进入文本模式命令行
2.打开/etc/inittab 文件 #vim /etc/inittab3.在默认的 run level 设置中,可以看到第一行书写如:id:5:initdefault:(默认的 run level ...
- ubuntu系统apache日志文件的位置
Debian,Ubuntu或Linux Mint上的Apache错误日志位置 默认的错误日志 在基于Debian的Linux上,系统范围的Apache错误日志默认位置是/var/log/apache2 ...
- CSS 循环动画效果。
@-moz-keyframes revolving{ 0{ -moz-transform: rotate(0deg); -webkit-transform: rotate(0deg); } 25%{ ...
- Python3中的输入输出
input()函数 我们可以通过Python3解释器查看Python3中input()的含义: >>> type(input) <class 'builtin_function ...
- uva820 Internet Bandwidth
就是模板... #include<cstdio> #include<cstring> #include<vector> #include<queue> ...