fork download
  1. #include <stdio.h>
  2.  
  3. int main(void)
  4. {
  5. char s[256];
  6. int i;
  7.  
  8. while (scanf("%d", &i) == 1)
  9. {
  10. printf("Going to assign #%d\n", i);
  11. fflush(stdout);
  12. s[i] = 'Q';
  13. }
  14.  
  15. printf("%d", strlen(s)); // Use s to eliminate optimizer
  16.  
  17. return 0;
  18. }
Runtime error #stdin #stdout 0s 2172KB
stdin
17
19
348
-3007
478999879
stdout
Going to assign #17
Going to assign #19
Going to assign #348
Going to assign #-3007
Going to assign #478999879