fork(3) download
  1. #include <stdio.h>
  2.  
  3. int main(void) {
  4. // your code goes here
  5. f(15);
  6. f(35);
  7. f(59);
  8. f(1);
  9. f(100);
  10. f(0);
  11. return 0;
  12. }
  13.  
  14. f(a){int d[]={0,4,4,6,5,5,4,6,6,5,3,6,6,8,8,7,7,9,8,8,0,3,6,6,5,5,5,7,6,6,7};printf("%d : %d",a,a?a<20?d[a]-(a<10):d[a%10]+d[20+a/10]:4);}
Success #stdin #stdout 0s 2052KB
stdin
Standard input is empty
stdout
15 : 735 : 1159 : 101 : 3100 : 70 : 4