UVA 408-Uniform Generator
来源:互联网 发布:淘宝模板免费的好吗 编辑:程序博客网 时间:2024/05/18 05:38
UVA 408-Uniform Generator
题目大意:给出Step和Mod,求是否能讲将[0,Mod-1]的序列全部生成
解题思路:俩个数最大公约数等于1就能满足
#include <stdio.h>#include <iostream>using namespace std;int main() { long long int a, b; while(scanf("%lld%lld", &a, &b) != EOF) { long long int m = a; long long int n = b; if(m > n) { long long int t = m; m = n; n = t; } long long int x; while((x = n % m) != 0) { n = m; m = x; } if(m == 1) printf("%10lld%10lld Good Choice\n", a, b); else printf("%10lld%10lld Bad Choice\n", a, b); printf("\n"); } return 0;}
0 0
- UVA 408-Uniform Generator
- UVa 408 Uniform Generator
- uva 408 - Uniform Generator
- uva 408 - Uniform Generator
- uva-408 - Uniform Generator
- UVa 408 - Uniform Generator
- UVa 408 Uniform Generator
- Uva 408 - Uniform Generator
- uva 408Uniform Generator
- UVa 408 - Uniform Generator
- UVa 408: Uniform Generator
- uva 408 Uniform Generator
- UVA 408 Uniform Generator
- uva 408 - Uniform Generator
- uva 408 Uniform Generator
- uva 408 - Uniform Generator
- UVa 408 - Uniform Generator
- UVa 408 - Uniform Generator
- spring用BeanNameAutoProxyCreator自动创建事务代理
- testNg之TestngRetry
- 独立成分分析ICA
- C#之 装箱拆箱
- nil、Nil、NULL与NSNull的区别
- UVA 408-Uniform Generator
- NYOJ-水池数目 poj-Lake Counting
- 假设寄存器为8位,用补码形式存储机器数,包括一位符号位,那么十进制数-25在寄存器表示为:
- testNg之TestResultListener
- Spring学习-第2天
- Solver文件
- php正则与入门正则搭配
- EditText 在不同场景下调用软键盘的总结
- 多校2016&&HDU.5723 Abandoned country