Problem hidden
|This problem was hidden by Editorial Board member probably because it has incorrect language|version or invalid test data, or description of the problem is not clear.|

RGB8013 - Урт ХИЕХ

Өгөгдсөн хоёр тооны ХИЕХ-ийг ол.

Input

10^9 тооноос үл хэтрэх 2 натурал тоо зайгаар тусгаарлагдан өгөгдөнө.

Output

ХИЕХ.

Example

Input:
18 12

Output:
6

Нэмсэн:Bataa
Огноо:2010-01-05
Хугацааны хязгаарлалт:1s
Эх кодын хэмжээний хязгаарлалт:50000B
Memory limit:1536MB
Cluster: Cube (Intel G860)
Програмчлалын хэлүүд:ADA95 ASM32 ASM64 BASH BF C CSHARP C++ 4.3.2 CPP CPP14 C99 CLPS LISP sbcl LISP clisp D ERL FORTRAN HASK ICON ICK JAVA JS-RHINO LUA NEM NICE OCAML PAS-GPC PAS-FPC PERL PHP PIKE PRLG-swi PYTHON RUBY SCALA SCM guile SCM qobi ST TCL TEXT WHITESPACE

hide comments
2016-03-12 11:23:42 lhagvasuren
#include <stdio.h>
#include <stdlib.h>
int a, b, c, d,m,n,x;
int main()
{
scanf("%d %d",&m,&n);
while (true)
{
if (m>n && m%n==0) { x=n; break; } else
if (m<=n && n%m==0) { x=m; break; } else
if (m==0) { x=n; break; } else
if (n==0) { x=m; break; } else
if (m>n) m=n%n; else
n=n%m;
}
printf("%d",x);
system("pause");
return 0;
}
2016-02-25 12:51:48
#include<stdio.h>
main()
{
long a,b,n,i;
scanf("%d %d",&a,&b);
if(a<=1000000000&&b<=1000000000)
if(a>b)a=a-b;
else b=b-a;
printf("%ld",b);
return 0;
}
2015-05-08 13:50:08


Last edit: 2015-05-08 13:50:27
2010-05-05 13:00:59 George_teller
Амархан аа

Last edit: 2010-08-01 07:15:33
2010-03-11 09:30:32 SS
Chi ooroo gus arhichin
2010-03-11 09:26:07 CSMS-Sw12d047
bi bol gus sodoo
© Spoj.com. All Rights Reserved. Spoj uses Sphere Engine™ © by Sphere Research Labs.