#include <cstddef>
#include <cstdio>
template< size_t N >
constexpr size_t length( char const (&)[N] )
{
return N-1;
}
int main() {
char temp[256];
sprintf(temp, "%s", "abc");
static_assert( length(temp) == 3, "string length is not 3" );
// your code goes here
return 0;
}
I2luY2x1ZGUgPGNzdGRkZWY+CiNpbmNsdWRlIDxjc3RkaW8+Cgp0ZW1wbGF0ZTwgc2l6ZV90IE4gPgpjb25zdGV4cHIgc2l6ZV90IGxlbmd0aCggY2hhciBjb25zdCAoJilbTl0gKQp7CglyZXR1cm4gTi0xOwp9CgppbnQgbWFpbigpIHsKCQoJY2hhciB0ZW1wWzI1Nl07CglzcHJpbnRmKHRlbXAsICIlcyIsICJhYmMiKTsKCXN0YXRpY19hc3NlcnQoIGxlbmd0aCh0ZW1wKSA9PSAzLCAic3RyaW5nIGxlbmd0aCBpcyBub3QgMyIgKTsKCQoJLy8geW91ciBjb2RlIGdvZXMgaGVyZQoJcmV0dXJuIDA7Cn0=