fork download
  1. #include <stdio.h>
  2.  
  3. int main(void) {
  4. int d1,d2;
  5. scanf("%d %d", &d1, &d2);
  6. printf("%d", d1 % d2 ? d1 + (d2 - d1 % d2) : d1);
  7. return 0;
  8. }
  9.  
Success #stdin #stdout 0s 9432KB
stdin
15 -6
stdout
6