codeforces 664A Complicated GCD
水题。。[a,b]区间数的最大公约数。
a==b输出a 否则输出1
#include<cstdio>
#include<cstring>
#include<iostream>
#include<queue>
#include<stack>
#include<cmath>
#include<algorithm>
using namespace std;
#define clc(a,b) memset(a,b,sizeof(a))
#define inf 0x3f3f3f3f
const int N=;
#define LL long long
const double eps = 1e-;
const double pi = acos(-);
// inline int r(){
// int x=0,f=1;char ch=getchar();
// while(ch>'9'||ch<'0'){if(ch=='-') f=-1;ch=getchar();}
// while(ch>='0'&&ch<='9'){x=x*10+ch-'0';ch=getchar();}
// return x*f;
// }
int main(){
char a[],b[];
cin>>a>>b;
if(strcmp(a,b)==)
cout<<a<<endl;
else
cout<<""<<endl;
return ;
}
codeforces 664A Complicated GCD的更多相关文章
- 664A - Complicated GCD
题意真是七零八落,乱七八糟.盲目瞎写,水过就好? #include <cstdio> #include <cstring> #include <algorithm> ...
- codeforces 664A A. Complicated GCD(水题)
题目链接: A. Complicated GCD time limit per test 1 second memory limit per test 256 megabytes input stan ...
- Codeforces Round #347 (Div.2)_A. Complicated GCD
题目链接:http://codeforces.com/contest/664/problem/A A. Complicated GCD time limit per test 1 second mem ...
- 【Codeforces 664A】 Complicated GCD
[题目链接] 点击打开链接 [算法] gcd(a,a+1) = 1 所以当a = b时,答案为a,否则为1 [代码] #include<bits/stdc++.h> using names ...
- codeforces 803C Maximal GCD(GCD数学)
Maximal GCD 题目链接:http://codeforces.com/contest/803/problem/C 题目大意: 给你n,k(1<=n,k<=1e10). 要你输出k个 ...
- Codeforces 803C. Maximal GCD 二分
C. Maximal GCD time limit per test: 1 second memory limit per test: 256 megabytes input: standard in ...
- Codeforces 338 D. GCD Table
http://codeforces.com/problemset/problem/338/D 题意: 有一张n*m的表格,其中第i行第j列的数为gcd(i,j) 给出k个数 问在这张表格中是否 有某一 ...
- Codeforces 583 DIV2 GCD Table 贪心
原题链接:http://codeforces.com/problemset/problem/583/C 题意: 大概就是给你个gcd表,让你还原整个序列. 题解: 由$GCD(a,a)=a$,我们知道 ...
- [Codeforces Round511C] Enlarge GCD
[题目链接] https://codeforces.com/contest/1047/problem/C [算法] 首先求出n个数的最大公约数g , 将每个数除以g , 那么 , 问题就转化为在n个数 ...
随机推荐
- C#表驱动法+一点反射实现“得到指定位数随机不重复字符串”三种方式的封装
1.结构 第一个类 public class GetMethods{...} 类中的变量: ...
- extern "C"的作用
一.概述 在C语言的头文件中,经常可以看到如下的代码,那这个是什么作用呢? #ifdef __cplusplus extern "C" { #endif /*...*/ #ifde ...
- java枚举类型enum的使用
2015-10-24 java达人 Java 中 的枚举类型采用关键字enum 来定义,从jdk1.5才有的新类型,所有的枚举类型都是继承自Enum 类型.要了解枚举类型,建议大家先打开jdk 中的E ...
- canvas 乒乓球
<!DOCTYPE html> <html> <head> <title>Bouncing Ball With inputs</title> ...
- iOS实现地图半翻页效果--老代码备用参考
// Curl the image up or down CATransition *animation = [CATransition animation]; [animation setDurat ...
- JS 操作URL(重要)
我们可以用javascript获得其中的各个部分1, window.location.href全部URl字符串(在浏览器中就是完整的地址栏)本例返回值: http://www.x2y2.com:80/ ...
- win2003 sp2+iis 6.0上部署.net 2.0和.net 4.0网站的方法
网站环境 IIS6.0,操作系统Windows server2003 sp2,服务器之前已经部署了.net 2.0和asp的网站,现在要部署新开发的.net 4.0网站.本来认为很简单,却遇到了很多问 ...
- java Arrays.asList()和Collections.addAll()
java中的方法Arrays.asList(arg1,arg2,arg3...),经常用在将多个元素或数组转化为List中的元素,但是在使用的时候,应该注意: arg1决定返回list的元素类型(即第 ...
- CSS 背景颜色
颜色背景 CSS中背景颜色由background-color决定,这里的背景颜色会渲染padding和content,不会渲染border和margin部分. 在css3中可以通过background ...
- Excel技巧收录
帮老婆弄Excel,自己也把学到的东西记录下,免得以后被问到又给忘了 数据透视,需先在数据透视区域加上表头,如公司名称.销量等,Excel数据透视默认将选择区域的第一行作为表头 VLOOKUP,VLO ...