题目链接:http://codeforces.com/contest/664/problem/A
题意:输入两个整数a,b,求a,a+1,a+2,........b的最大公约数。a,b不超过100位数
解法: 当a==b时,公约数是他本身。当a!= b时,公约数为1。
总结:对于英文题,看清题目在做,,,,有时候读懂了题就变简单了
AC:
#include <algorithm>
#include <string>
#include <iostream>
#include <string.h>
#include<stdio.h>
#include<cmath>
#include<vector>
using namespace std;
#define maxn 1000
#define ll long long int
int main()
{
char s1[maxn],s2[maxn];
cin>>s1>>s2;
if(strcmp(s1,s2)==0)
{
cout<<s1<<endl;
}
else puts("1");
return 0;
}