fork download
  1. #include <stdio.h>
  2.  
  3. int div(int m,int n){
  4.  
  5. if(m < n){
  6. return 0;
  7. }else{
  8. return 1 + div(m-n,n);
  9. }
  10. }
  11.  
  12. int main(void) {
  13. int m,n;
  14.  
  15. scanf("%d,%d",&m,&n);
  16. printf("%d",div(m,n));
  17.  
  18. return 0;
  19. }
  20.  
Success #stdin #stdout 0.01s 5320KB
stdin
18,4
stdout
4