Codeforces 664A Complicated GCD

Source: Internet
Author: User
Tags greatest common divisor

Water problem. [A, b] interval number of greatest common divisor.

A==b output a otherwise output 1

1#include <cstdio>2#include <cstring>3#include <iostream>4#include <queue>5#include <stack>6#include <cmath>7#include <algorithm>8 using namespacestd;9 #defineCLC (A, B) memset (A,b,sizeof (a))Ten #defineINF 0x3f3f3f3f One Const intn=10010; A #defineLL Long Long - Const DoubleEPS = 1e-5; - Const DoublePI = ACOs (-1); the //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; - // } + intMain () { A     Chara[ the],b[ the]; atCin>>a>>b; -     if(strcmp (A, b) = =0) -cout<<a<<Endl; -     Else -cout<<"1"<<Endl; -     return 0; in}
View Code

Codeforces 664A Complicated GCD

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.