1 solutions

  • 0
    @ 2025-12-3 11:01:44

    C++ :

    #include<bits/stdc++.h>
    using namespace std;
    int a,b,c,d,e;
    int main()
    {
    	cin>>a>>b>>c;
    	d=a%c;
    	e=b%c;
    	if(d>e) cout<<e;
    	else{
    		cout<<d;
    	}
    }
    
    • 1

    Information

    ID
    789
    Time
    1000ms
    Memory
    128MiB
    Difficulty
    5
    Tags
    (None)
    # Submissions
    16
    Accepted
    15
    Uploaded By