fork download
  1. #include <stdio.h>
  2.  
  3. int main(void) {
  4. int a, b, ghai, thia, ghul, thul, c , d;
  5. scanf("%d", &a);
  6. b=a;
  7. thul=0;
  8. ghul=0;
  9. for(ghai=4; ghai<b ;b=b-4){
  10. ghul=ghul+1;
  11. }
  12. for(thia=2; b>0; b=b-2){
  13. thul=thul+1;
  14. }
  15. c=thul+ghul;
  16. for(d=0; a>0; a=a-thia){
  17. d=d+1;
  18. }
  19. printf("%d\n%d", c, d);
  20. return 0;
  21. }
  22.  
Success #stdin #stdout 0s 5316KB
stdin
10
stdout
3
5