请教如何修改呢?
[此贴子已经被作者于2022-6-14 18:44编辑过]
#include <stdio.h> #include <string.h> int main( void ) { const char* a = "1367710131911391232766077448382086666328896689268954469043548381908506005385256411314212743671450634"; const char* p = strrchr( a, '1' ); if( p && p>=a+2 ) printf( "%c %c %c\n", p[0], p[-1], p[-2] ); }