[热身题][hdoj_2028]Lowest Common Multiple Plus
来源:互联网 发布:怎么用excel筛选数据 编辑:程序博客网 时间:2024/04/29 17:40
// hdoj_2028 Lowest Common Multiple Plus// 0MS 228K 341 B GCC#include <stdio.h>int main(void){ int n; __int64 x, y, a, b, temp; while(scanf("%d", &n) != EOF) { scanf("%I64d", &x); a = x; while(--n) { scanf("%I64d", &y); b = y; while(y) { temp = x%y; x = y; y = temp; } x = a*b/x; a = x; } printf("%I64d\n", x); } return 0;}
/*32位数……int; long int; long long 都不行(理论上 __int64 和long long 是相同的,但由于用的是windows下的MingW,所以long long 不可以,__int64可以)__int64可以注意输入和输出的时候要用%I64d*/
相关资料:
__int64 类型(VC中)与long long 型(gcc中,C99标准)
- [热身题][hdoj_2028]Lowest Common Multiple Plus
- hdoj_2028 Lowest Common Multiple Plus
- HDOJ_2028(Lowest Common Multiple Plus)
- Lowest Common Multiple Plus
- Lowest Common Multiple Plus
- Lowest Common Multiple Plus
- Lowest Common Multiple Plus
- Lowest Common Multiple Plus
- Lowest Common Multiple Plus
- Lowest Common Multiple Plus
- Lowest Common Multiple Plus
- Lowest Common Multiple Plus
- Lowest Common Multiple Plus
- Lowest Common Multiple Plus
- Lowest Common Multiple Plus
- 2028 Lowest Common Multiple Plus
- 【hdoj2028】Lowest Common Multiple Plus
- HDU_2028 Lowest Common Multiple Plus
- 剪贴板操作
- Linux常用命令
- 使用/dev/null
- android 把bitmap转成drawble后宽高不一致的解决方法
- window API 函数浅析
- [热身题][hdoj_2028]Lowest Common Multiple Plus
- pthread库中操作线程专有数据的函数:pthread_key_create,pthread_setspecific,pthread_gtespecific,pthread_key_delete
- Documentation 文件上传
- 数据库基础
- .net使用自定义控件
- SQL 中的正则 查询
- LINQ to SQL语句(22)之DataContext
- Android的另类布局方式include和层叠layer-list方式
- linux rpm命令 安装 查询软件包 centos6.2中rpm使用