1 solutions

  • 0
    @ 2025-11-5 16:08:44

    C :

    #include <stdio.h> 
    void swap(int *a, int *b)
    {
    	int temp;
    	temp = *a;
    	*a = *b; *b = temp;
    }
    int f(int a, int b)
    {
    	int m, n, r;
    	if(a<b)
    	swap(&a, &b);
    	m = a, n = b, r = a % b;
    	if(r==0)	return a;
    	else	return a*b; 
    }
    int main()
    {
    	int a,b,c;
    	scanf("%d %d %d",&a,&b,&c);
    	printf("%d",f(f(a,b),c));  
    	return 0;
    }
    
    • 1

    Information

    ID
    17515
    Time
    1000ms
    Memory
    128MiB
    Difficulty
    (None)
    Tags
    # Submissions
    0
    Accepted
    0
    Uploaded By