#include <cstdlib>
#include <iostream>
int main() {
char a[] = "123";
char *p;
long l = strtol (a, &p, 10);
std::cout << l << ' ' << (p == a + 3) << '\n';
char b[] = "abc";
l = strtol (b, &p, 10);
std::cout << l << ' ' << (p == b + 3);
}
I2luY2x1ZGUgPGNzdGRsaWI+CiNpbmNsdWRlIDxpb3N0cmVhbT4KCmludCBtYWluKCkgewogICAgY2hhciBhW10gPSAiMTIzIjsKICAgIGNoYXIgKnA7CiAgICBsb25nIGwgPSBzdHJ0b2wgKGEsICZwLCAxMCk7CiAgICBzdGQ6OmNvdXQgPDwgbCA8PCAnICcgPDwgKHAgPT0gYSArIDMpIDw8ICdcbic7CgogICAgY2hhciBiW10gPSAiYWJjIjsKICAgIGwgPSBzdHJ0b2wgKGIsICZwLCAxMCk7CiAgICBzdGQ6OmNvdXQgPDwgbCA8PCAnICcgPDwgKHAgPT0gYiArIDMpOwp9