/*
Copyright 2011 Marek "p2004a" Rusinowski
Euclidean algorithm
*/
#include <cstdio>
int gcd( int a, int b) {
return b ? gcd( b, a % b) : a;
}
int main( ) {
int a, b;
scanf ( "%d %d" , & a, & b) ;
printf ( "%d\n " , gcd( a, b) ) ;
return 0 ;
}
LyoKICBDb3B5cmlnaHQgMjAxMSBNYXJlayAicDIwMDRhIiBSdXNpbm93c2tpCiAgRXVjbGlkZWFuIGFsZ29yaXRobQoqLwojaW5jbHVkZSA8Y3N0ZGlvPgoKaW50IGdjZChpbnQgYSwgaW50IGIpIHsKICByZXR1cm4gYiA/IGdjZChiLCBhICUgYikgOiBhOwp9CgppbnQgbWFpbigpIHsKICBpbnQgYSwgYjsKICBzY2FuZigiJWQgJWQiLCAmYSwgJmIpOwogIHByaW50ZigiJWRcbiIsIGdjZChhLCBiKSk7CiAgcmV0dXJuIDA7Cn0K
compilation info
prog.cpp: In function ‘int main()’:
prog.cpp:13: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result
stdout