fork download
  1. #include <stdio.h>
  2.  
  3. int main(void) {
  4. // your code goes here
  5. int x;
  6. int y;
  7. scanf("%d",&x);
  8. scanf("%d",&y);
  9. while(x!=y){
  10. if(x>y){x=x-y;}else{y=y-x;}
  11. }
  12. printf("%d",x);
  13.  
  14. return 0;
  15. }
  16.  
Success #stdin #stdout 0s 5304KB
stdin
13
11
stdout
1