提交时间:2026-05-02 15:58:23

运行 ID: 320021

#include<bits/stdc++.h> using anmespace std; int main(){ int a,b,c,d,e; cin>>a>>b; c=a%b; d=b-c; e=a/b; if(c>d)cout<<a+d; else if(c<d)cout<<a-c; else cout<<a-c<<endl<<a+d; return 0; }