fork download
  1. #include <stdio.h>
  2.  
  3. int main(void) {
  4. int n;
  5. scanf("%d",&n);
  6. int temp;
  7. int count=0;
  8. count+=n/100;
  9. temp=n%100;
  10.  
  11. count+=temp/20;
  12. temp%=20;
  13.  
  14. count+=temp/10;
  15. temp%=10;
  16.  
  17. count+=temp/5;
  18. temp%=5;
  19.  
  20. count+=temp/1;
  21. temp%=1;
  22. printf("%d",count);
  23. return 0;
  24. }
  25.  
Success #stdin #stdout 0s 5276KB
stdin
1000000000
stdout
10000000