Language: C

#include <stdio.h>                                                                                                                                                                                                                                                              int main(){                                                                                                                                     char n[20];                                                                                                                             scanf("%s",&n);                                                                                                                         int len = strlen(n);                                                                                                                                                                                                                                                            int all9 = 1; // all number *expect the first digil*   is 9                                                                             for(char* i = n+1; *i != NULL; i++){                                                                                                            if( *i != '9' ){                                                                                                                                all9 = 0;                                                                                                                               break;                                                                                                                          }                                                                                                                               }                                                                                                                                                                                                                                                                               int ret = 9 * (len - 1);                                                                                                                                                                                                                                                        n[1] = NULL;                                                                                                                            ret += atoi( n );                                                                                                                       if( ! all9 ) ret -= 1;                                                                                                                                                                                                                                                          printf("%d %d\n", ret, all9);                                                                                                                                                                                                                                                   return 0;                                                                                                                       }     
                                                                                              

Compiler output:
main.c:1:273: warning: extra tokens at end of #include directive
    1 | #include <stdio.h>                                                                                                                                                                                                                                                              int main(){                                                                                                                                     char n[20];                                                                                                                             scanf("%s",&n);                                                                                                                         int len = strlen(n);                                                                                                                                                                                                                                                            int all9 = 1; // all number *expect the first digil*   is 9                                                                             for(char* i = n+1; *i != NULL; i++){                                                                                                            if( *i != '9' ){                                                                                                                                all9 = 0;                                                                                                                               break;                                                                                                                          }                                                                                                                               }                                                                                                                                                                                                                                                                               int ret = 9 * (len - 1);                                                                                                                                                                                                                                                        n[1] = NULL;                                                                                                                            ret += atoi( n );                                                                                                                       if( ! all9 ) ret -= 1;                                                                                                                                                                                                                                                          printf("%d %d\n", ret, all9);                                                                                                                                                                                                                                                   return 0;                                                                                                                       }
      |                                                                                                                                                                                                                                                                                 ^~~
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x17): undefined reference to `main'
collect2: error: ld returned 1 exit status