2 solutions

  • 1
    @ 2025-4-26 11:51:22
    #include<bits/stdc++.h>
    using namespace std;
    typedef long long LL;
    int main()
    {
    	int a,b,c;
    	cin>>a>>b>>c;
    	int minv=a/c,maxv=b/c;
    	if(a==b&&b==c)
    	{
    		cout<<a;
    	}
    	else if(maxv>minv)
    	{
    		cout<<(minv+1)*c;
    	}
    	else
    	{
    		cout<<-1;
    	}
    	return 0;	
    }
    • 1
      @ 2025-4-26 11:35:58

      dlkjdhks vacljdskz;qwd;lfsaklhcfrbe0mrnsnuts lteonsdv

      • 1

      Information

      ID
      2446
      Time
      1000ms
      Memory
      256MiB
      Difficulty
      1
      Tags
      (None)
      # Submissions
      18
      Accepted
      8
      Uploaded By