fork download
  1. #include <stdio.h>
  2.  
  3. int main(void) {
  4. char colorStr[100];
  5. int r, g, b;
  6. while(scanf(" %99[^:]: %d %d %d", colorStr, &r, &g, &b) == 4) {
  7. printf("%s: %d %d %d\n", colorStr, r, g, b);
  8. }
  9. return 0;
  10. }
  11.  
Success #stdin #stdout 0s 9432KB
stdin
Thing 1: 0 0 128
Other thing: 255 64 255
Something else: 32 32 8
stdout
Thing 1: 0 0 128
Other thing: 255 64 255
Something else: 32 32 8