#include <stdint.h>
#include <stdio.h>
#include <string.h>
int main ()
{
char str[] = "123,234,210";
uint8_t r, g, b;
if ( sscanf( str, "%hhu,%hhu,%hhu", &r, &g, &b ) == 3 )
{
printf( "r = %hhu, g = %hhu, b = %hhu\n", r, g, b );
}
return 0;
}
I2luY2x1ZGUgPHN0ZGludC5oPgojaW5jbHVkZSA8c3RkaW8uaD4KI2luY2x1ZGUgPHN0cmluZy5oPgoKaW50IG1haW4gKCkKewogIGNoYXIgc3RyW10gPSAiMTIzLDIzNCwyMTAiOwoKICB1aW50OF90IHIsIGcsIGI7CiAgCiAgaWYgKCBzc2NhbmYoIHN0ciwgIiVoaHUsJWhodSwlaGh1IiwgJnIsICZnLCAmYiApID09IDMgKQogIHsKICAJcHJpbnRmKCAiciA9ICVoaHUsIGcgPSAlaGh1LCBiID0gJWhodVxuIiwgciwgZywgYiApOwogIH0KICAKICByZXR1cm4gMDsKfQ==