HDU 2028 看看输入的技巧
来源:互联网 发布:药品查询软件 编辑:程序博客网 时间:2024/06/05 02:47
n个数的最小公倍数
#include <iostream>#include <cstdio>#include <cstring>#include <set>#include <queue>#include <algorithm>#include <functional>#include <string>#include <map>#include <cmath>#include <iomanip>using namespace std;const int maxn=1000;const int inf=0x3f3f3f3f;int gcd(int a,int b)//这里用了简单的递归{ if(b==0)return a; return gcd(b,a%b);}int main(){ int n,a,b,c; while(scanf("%d",&n)==1) { scanf("%d",&a); for(int i=0;i<n-1;i++) { int t; scanf("%d",&b); c=gcd(a,b); a=a/c*b; } printf("%d\n",a); }}
阅读全文
0 0
- HDU 2028 看看输入的技巧
- EXCEL使用技巧大全:输入的技巧
- Excel高速输入的技巧
- 动态输入的一些技巧
- hdu 2586的技巧
- eclipse快捷键与技巧大全(需要的看看)
- linux命令行输入的的一些技巧
- word2000中输入幂指数的技巧
- android技巧:手写输入的联想输入实现
- Excel XP的快速输入技巧
- 多行下标的输入技巧
- MathType中真子集的输入技巧
- 小技巧:cin输入字符串的总结
- LaTeX技巧:多行下标的输入技巧
- 面试中65个问题的技巧回答,需要工作的你必须看看
- Android 限制EditText只能输入数字、限制输入类型、限制输入长度的小技巧
- Android 限制EditText只能输入数字、限制输入类型、限制输入长度的小技巧
- Android 限制EditText只能输入数字、限制输入类型、限制输入长度的小技巧
- MooseFS3.0分布式文件系统安装升级手记【安装升级03】
- 数据库学习(2)
- windows socket编程实现两台电脑间的通信
- 扒一扒---UML图与软件工程那点关系
- Spring boot之登录拦截器
- HDU 2028 看看输入的技巧
- kaggle Code : Titanic: Machine Learning from Disaster 分类
- 单点登录生成证书遇到的问题
- jquery和javascript屏蔽右键菜单及阻止事件冒泡
- Angular 环境安装与配置
- 软件的国际化、Jstl国际化标签
- 一分钟了解“be 形容词1 and 形容词2 的用法”
- win10下MongoDB安装与配置
- lxml的另一种用法