1 solutions

  • 0
    @ 2025-12-3 17:21:29

    C++ :

    #include<bits/stdc++.h>
    using namespace std;
    int n,k;
    int main()
    {
    	cin>>n>>k;
    	if(n%k==0) cout<<n;
    	else{
    		int x=n/k;
    		cout<<x*k;
    	}
    	return 0;
    }
    
    
    • 1

    Information

    ID
    996
    Time
    1000ms
    Memory
    128MiB
    Difficulty
    10
    Tags
    # Submissions
    1
    Accepted
    1
    Uploaded By