fork download
  1. #include <stdio.h>
  2. #include <math.h>
  3.  
  4. int main(void) {
  5. int cnt = 0;
  6. int n;
  7.  
  8. for( n = 1; n <= 21; n++ ) {
  9. cnt += 10 - ceil(pow(10, 1 - (1.0 / (double)n)));
  10. }
  11.  
  12. printf("%d\n", cnt);
  13.  
  14. return 0;
  15. }
  16.  
Success #stdin #stdout 0s 2168KB
stdin
Standard input is empty
stdout
49